| library test; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/inference/abstract_class_instantiation.dart:15:27: Warning: The class 'C' is abstract and can't be instantiated. |
| // var /*@type=C*/ x = new C(); |
| // ^ |
| // |
| // pkg/front_end/testcases/inference/abstract_class_instantiation.dart:16:50: Warning: The class 'D' is abstract and can't be instantiated. |
| // var /*@type=D<int>*/ y = new /*@typeArgs=int*/ D(1); |
| // ^ |
| // |
| // pkg/front_end/testcases/inference/abstract_class_instantiation.dart:17:48: Warning: The class 'D' is abstract and can't be instantiated. |
| // D<List<int>> z = new /*@typeArgs=List<int>*/ D(/*@typeArgs=int*/ []); |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| abstract class C extends core::Object { |
| synthetic constructor •() → self::C |
| : super core::Object::•() |
| ; |
| } |
| abstract class D<T extends core::Object = dynamic> extends core::Object { |
| constructor •(self::D::T t) → self::D<self::D::T> |
| : super core::Object::•() |
| ; |
| } |
| static method test() → void { |
| dynamic x = throw new core::AbstractClassInstantiationError::•("C"); |
| dynamic y = let final core::Object #t1 = 1 in throw new core::AbstractClassInstantiationError::•("D"); |
| self::D<core::List<core::int>> z = let final core::Object #t2 = <dynamic>[] in throw new core::AbstractClassInstantiationError::•("D"); |
| } |
| static method main() → dynamic {} |