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

Unified Diff: tests/language/type_argument_substitution_test.dart

Issue 771673002: Add a test to test that substitutions are emitted for classes that are only used as type arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/type_argument_substitution_test.dart
diff --git a/tests/language/type_argument_substitution_test.dart b/tests/language/type_argument_substitution_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..1383c4f67778b0de7ebab7ee60b627c0ad32a188
--- /dev/null
+++ b/tests/language/type_argument_substitution_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that substitutions are emitted for classes that are only used as
+// type arguments.
+
+import 'package:expect/expect.dart';
+
+class K {}
+
+class A<T> {}
+
+class B extends A<K> {}
+
+class X<T> {}
+
+main() {
+ var v = new DateTime.now().millisecondsSinceEpoch != 42
+ ? new X<B>() : new X<A<String>>();
+ Expect.isFalse(v is X<A<String>>);
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698