Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: tests/language/type_literal_prefix_call_test.dart

Issue 794593002: Allow dart2js to compile calls to type literals when prefixed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/type_literal_prefix_call_test.dart
diff --git a/tests/language/reify_typevar_test.dart b/tests/language/type_literal_prefix_call_test.dart
similarity index 60%
copy from tests/language/reify_typevar_test.dart
copy to tests/language/type_literal_prefix_call_test.dart
index 874efd681964049629144e7c794da601f50d354a..1732ed8f619a6a36ea73b7203e78b1b320b04f8b 100644
--- a/tests/language/reify_typevar_test.dart
+++ b/tests/language/type_literal_prefix_call_test.dart
@@ -3,14 +3,10 @@
// BSD-style license that can be found in the LICENSE file.
import "package:expect/expect.dart";
+import 'dart:core' as core;
-class Foo<T> {
- reify() {
- return T;
- }
-}
+// Check that calling a type with a prefix is allowed, but throws at runtime.
main() {
- Expect.equals(int, new Foo<int>().reify());
- Expect.equals(Foo, new Foo().runtimeType);
+ Expect.throws(() => core.List(), (e) => e is core.NoSuchMethodError);
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698