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..5099857baa21fef7a4f2907933511d2466f27ba3 |
| --- /dev/null |
| +++ b/tests/language/type_variables_static_scoping_test.dart |
| @@ -0,0 +1,20 @@ |
| +class Foo<T> { |
| + 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; |
|
ngeoffray
2012/10/02 07:53:46
too many indentation
aam-me
2012/10/02 12:50:39
Done.
|
| + 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 |
| +} |