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

Unified Diff: tests/language_2/type_variable_scope2_test.dart

Issue 3008723002: Migrate block 163 to Dart 2.0. (Closed)
Patch Set: Merge fixups Created 3 years, 4 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_2/type_variable_promotion_test.dart ('k') | tests/language_2/type_variable_scope3_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language_2/type_variable_scope2_test.dart
diff --git a/tests/language_strong/unnamed_closure_test.dart b/tests/language_2/type_variable_scope2_test.dart
similarity index 54%
rename from tests/language_strong/unnamed_closure_test.dart
rename to tests/language_2/type_variable_scope2_test.dart
index 49fa570dc52de317974b3b329c43147ca1b43733..6893e2d771fdcce243c19e0892516bbcf519bbfc 100644
--- a/tests/language_strong/unnamed_closure_test.dart
+++ b/tests/language_2/type_variable_scope2_test.dart
@@ -4,19 +4,13 @@
import "package:expect/expect.dart";
-getNonArray() => new A();
+// Test that malformed type arguments are treated as an error.
-class A {
- operator [](index) => index;
+class Foo<T> {
+ // T is not in scope for a static method.
+ static Foo<T> m() { /*@compile-error=unspecified*/
+ return new Foo();
+ }
}
-main() {
- Expect.equals(42, () {
- var res;
- do {
- var a = getNonArray();
- res = a[42];
- } while (false);
- return res;
- }());
-}
+main() {}
« no previous file with comments | « tests/language_2/type_variable_promotion_test.dart ('k') | tests/language_2/type_variable_scope3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698