blob: f868a87ea085eea0a99b02dead6aee9759931db8 [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/abstract_class_instantiation.dart:15:38: Error: The class 'C' is abstract and can't be instantiated.
// var /*@type=invalid-type*/ x = new C();
// ^
//
// pkg/front_end/testcases/inference/abstract_class_instantiation.dart:16:38: Error: The class 'D' is abstract and can't be instantiated.
// var /*@type=invalid-type*/ y = new D(1);
// ^
//
// pkg/front_end/testcases/inference/abstract_class_instantiation.dart:17:24: Error: The class 'D' is abstract and can't be instantiated.
// D<List<int>> z = new D(/*@typeArgs=dynamic*/ []);
// ^
//
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 {
invalid-type x = invalid-expression "The class 'C' is abstract and can't be instantiated.";
invalid-type y = let final core::Object? #t1 = 1 in invalid-expression "The class 'D' is abstract and can't be instantiated.";
self::D<core::List<core::int>> z = let final core::Object? #t2 = core::_GrowableList::•<dynamic>(0) in invalid-expression "The class 'D' is abstract and can't be instantiated.";
}
static method main() dynamic {}