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

Unified Diff: tests/lib/mirrors/regress_14304_test.dart

Issue 39783003: Substitute types in instances of generic classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added regression test and updated dart2js_extra.status. Created 7 years, 2 months 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 | « tests/lib/mirrors/generic_type_mirror_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/regress_14304_test.dart
diff --git a/tests/language/vm/reflect_core_vm_test.dart b/tests/lib/mirrors/regress_14304_test.dart
similarity index 56%
copy from tests/language/vm/reflect_core_vm_test.dart
copy to tests/lib/mirrors/regress_14304_test.dart
index 2474b216f7bf0b641535f0b18af4573eb9c7e723..e63cae08dcfd46e7652246732cff0295dddf0608 100644
--- a/tests/language/vm/reflect_core_vm_test.dart
+++ b/tests/lib/mirrors/regress_14304_test.dart
@@ -2,14 +2,19 @@
// 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 reflection of private functions in core classes.
+// Regression test for Issue 14304.
-import "package:expect/expect.dart";
import "dart:mirrors";
+import "package:expect/expect.dart";
-main() {
- var s = "string";
- var im = reflect(s);
- Expect.throws(() => im.invoke(const Symbol("_setAt"), [0, 65]), (e) => e is NoSuchMethodError);
+class A<T> {
+ T m() {}
}
+main() {
+ ClassMirror a = reflectClass(A);
+ TypeVariableMirror t = a.typeVariables[0];
+ MethodMirror m = a.methods.values.single;
+
+ Expect.equals(t, m.returnType);
+}
« no previous file with comments | « tests/lib/mirrors/generic_type_mirror_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698