Chromium Code Reviews| Index: tests/language/type_variables_static_scoping_test.dart |
| diff --git a/tests/language/type_variables_static_scoping_test.dart b/tests/language/type_variables_static_scoping_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e3623947fcbcfd483b3795b6dbb2c01715cb0079 |
| --- /dev/null |
| +++ b/tests/language/type_variables_static_scoping_test.dart |
| @@ -0,0 +1,20 @@ |
| +class Foo<T> { |
|
ahe
2012/10/04 07:51:02
Missing copyright (see other files) and no test de
|
| + T t; |
| + static T x; /// 01: compile-time error |
| + static foo1() => new Foo<T>(); /// 02: compile-time error |
| + Foo(); |
| + Foo.dup(T); |
| + static void foo1(T x) => null; /// 03: compile-time error |
| + static void foo2() => new Foo<T>(); /// 04: compile-time error |
| + static T foo3() => null; /// 05: compile-time error |
| +} |
| + |
| +main() { |
| + new Foo<int>().t = 1; |
| + Foo.x = 1; /// 01: continued |
| + Foo.foo1(); /// 02: continued |
| + new Foo<int>.dup(1); |
| + Foo.foo1(1); /// 03: continued |
| + Foo.foo2(); /// 04: continued |
| + Foo.foo3(); /// 05: continued |
| +} |