Chromium Code Reviews| Index: tests/language_2/type_variable_bounds_test.dart |
| diff --git a/tests/language/type_variable_bounds_test.dart b/tests/language_2/type_variable_bounds_test.dart |
| similarity index 58% |
| rename from tests/language/type_variable_bounds_test.dart |
| rename to tests/language_2/type_variable_bounds_test.dart |
| index 5fe2a3c9b4c9131487e57d69bf7c4cf16fb6564f..a51ae7d37d3545de2e8ea25d997b1cacc090ec17 100644 |
| --- a/tests/language/type_variable_bounds_test.dart |
| +++ b/tests/language_2/type_variable_bounds_test.dart |
| @@ -7,9 +7,9 @@ |
| class Foo<T extends num> { |
| Foo(); |
| - factory Foo.bad() = XFoo; // //# 00: static type warning |
| + factory Foo.bad() = XFoo; //# 00: compile-time error |
| - factory Foo.good() = Foo; |
| + factory Foo.good() = Foo<T>; |
| factory Foo.IFoo() { |
| return null; |
| @@ -17,12 +17,12 @@ class Foo<T extends num> { |
| } |
| abstract class IFoo<T extends num> { |
| - factory IFoo() = Foo<T>; |
| + factory IFoo() = Foo<T>; //# 11: compile-time error |
| } |
| // String is not assignable to num. |
| class Baz |
| - extends Foo<String> //# 01: static type warning, dynamic type error |
| + extends Foo<String> //# 01: compile-time error |
| {} |
| class Biz extends Foo<int> {} |
| @@ -31,25 +31,25 @@ Foo<int> fi; |
| // String is not assignable to num. |
|
eernst
2017/09/04 17:05:02
The actual type argument in the type annotation `F
|
| Foo |
| - <String> //# 02: static type warning, dynamic type error |
| + <String> //# 02: compile-time error |
| fs; |
| class Box<T> { |
| // Box.T is not assignable to num. |
|
eernst
2017/09/04 17:05:02
Same issue: adjust to `Box.T is not guaranteed to
|
| - Foo<T> t; //# 03: static type warning |
| + Foo<T> t; //# 03: compile-time error |
| makeFoo() { |
| // Box.T is not assignable to num. |
|
eernst
2017/09/04 17:05:02
Same again.
|
| - return new Foo<T>(); //# 04: static type warning, dynamic type error |
| + return new Foo<T>(); //# 04: compile-time error |
| } |
| } |
| main() { |
| // String is not assignable to num. |
|
eernst
2017/09/04 17:05:02
Same again: `String is not a subtype of num`.
|
| - var v1 = new Foo<String>(); //# 05: static type warning, dynamic type error |
| + var v1 = new Foo<String>(); //# 05: compile-time error |
| // String is not assignable to num. |
|
eernst
2017/09/04 17:05:02
Same again.
|
| - Foo<String> v2 = null; //# 06: static type warning |
| + Foo<String> v2 = null; //# 06: compile-time error |
| new Baz(); |
| new Biz(); |
| @@ -62,14 +62,14 @@ main() { |
| new Box<String>().makeFoo(); |
| // Fisk does not exist. |
| - new Box<Fisk>(); //# 07: static type warning |
| + new Box<Fisk>(); //# 07: compile-time error |
| // Too many type arguments. |
| - new Box<Object, Object>(); //# 08: static type warning |
| + new Box<Object, Object>(); //# 08: compile-time error |
| // Fisk does not exist. |
| - Box<Fisk> box = null; //# 09: static type warning |
| + Box<Fisk> box = null; //# 09: compile-time error |
| // Too many type arguments. |
| - Box<Object, Object> box = null; //# 10: static type warning |
| + Box<Object, Object> box = null; //# 10: compile-time error |
| } |