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

Unified Diff: tests/language/type_parameter_test.dart

Issue 19030004: Stop resolving classes prematurely in the vm (issue 11023). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/language/language_dart2js.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/type_parameter_test.dart
===================================================================
--- tests/language/type_parameter_test.dart (revision 24964)
+++ tests/language/type_parameter_test.dart (working copy)
@@ -30,8 +30,19 @@
static final
T /// 04: static type warning, dynamic type error
- staticField = "not_null";
+ staticFinalField = "not_null";
+ static const
+ // TODO(regis): Support 'compile-time type error' in test.dart and use below.
+ T /// 05: static type warning, compile-time error
+ staticConstField = "not_null";
+
+ static not_null() => "not_null";
+ static final
+ T /// 06: static type warning, dynamic type error
+ staticFinalField2 = not_null();
+
+
// Assigning null to a malformed type is not a dynamic error.
static
T staticMethod2(T a) {
@@ -40,7 +51,10 @@
return a;
}
- static final T staticField2 = null;
+ static final T staticFinalField3 = null;
+
+ static null_() => null;
+ static final T staticFinalField4 = null_();
}
main() {
@@ -59,8 +73,11 @@
Expect.isFalse(s is Set<double>);
A.staticMethod("not_null");
- print(A.staticField);
+ print(A.staticFinalField);
+ print(A.staticConstField);
+ print(A.staticFinalField2);
A.staticMethod2(null);
- print(A.staticField2);
+ print(A.staticFinalField3);
+ print(A.staticFinalField4);
}
« no previous file with comments | « tests/language/language_dart2js.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698