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

Unified Diff: tests/language/reify_typevar_test.dart

Issue 348053002: dart2dart: Support for all constants in new backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Formatting stuff Created 6 years, 6 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
Index: tests/language/reify_typevar_test.dart
diff --git a/tests/compiler/dart2js_extra/16407_test.dart b/tests/language/reify_typevar_test.dart
similarity index 58%
copy from tests/compiler/dart2js_extra/16407_test.dart
copy to tests/language/reify_typevar_test.dart
index aff1ba337ddab1eb5d219ac635653b48d4f8d1bc..32306c320c23079b65cfc60eb33498406e0761e2 100644
--- a/tests/compiler/dart2js_extra/16407_test.dart
+++ b/tests/language/reify_typevar_test.dart
@@ -4,13 +4,17 @@
import "package:expect/expect.dart";
-// Regression test for Issue 16407.
+class Foo<T> {
+ reify() {
+ return T;
+ }
+}
-void main() {
- foo(null, true);
- foo('x', false);
+baz() {
+ return Foo;
}
-var foo = (x, result) {
- Expect.equals(result, x is Null, '$x is Null');
-};
+main() {
+ Expect.equals(int, new Foo<int>().reify());
+ Expect.equals("Foo", baz().toString());
+}

Powered by Google App Engine
This is Rietveld 408576698