Chromium Code Reviews| 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..fe509679832dbc8561859e731a26c1a5fba57c3d 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 dynamic. |
|
Lasse Reichstein Nielsen
2017/08/29 08:49:44
Seems they are treated as an error, not dynamic. U
jcollins
2017/08/29 17:39:10
Done.
|
| -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() {} |