blob: ae15fb0fc4df7cd7c90a2dfbc88722d12a8d5fba [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/regress/issue_34403.dart:18:14: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// var c1 = C.bar<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:20:18: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// var c2 = new C.bar<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:22:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
// var c3 = C<String>.bar<int>();
// ^
// pkg/front_end/testcases/regress/issue_34403.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
// // @dart=2.14
// ^^^^^^^^^^^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:22:22: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// var c3 = C<String>.bar<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:24:26: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// var c4 = new C<String>.bar<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:27:16: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// const d1 = D.foo<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:29:22: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// const d2 = const D.foo<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:31:15: Error: The 'constructor-tearoffs' language feature is disabled for this library.
// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
// const d3 = D<String>.foo<int>();
// ^
// pkg/front_end/testcases/regress/issue_34403.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
// // @dart=2.14
// ^^^^^^^^^^^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:31:24: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// const d3 = D<String>.foo<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:33:30: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// const d4 = const D<String>.foo<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:36:16: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// var e1 = p.E.bar<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:38:20: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// var e2 = new p.E.bar<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:40:15: Error: The 'constructor-tearoffs' language feature is disabled for this library.
// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
// var e3 = p.E<String>.bar<int>();
// ^
// pkg/front_end/testcases/regress/issue_34403.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
// // @dart=2.14
// ^^^^^^^^^^^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:40:24: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// var e3 = p.E<String>.bar<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:42:28: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// var e4 = new p.E<String>.bar<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:45:18: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// const f1 = p.F.foo<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:47:24: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// const f2 = const p.F.foo<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:49:17: Error: The 'constructor-tearoffs' language feature is disabled for this library.
// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
// const f3 = p.F<String>.foo<int>();
// ^
// pkg/front_end/testcases/regress/issue_34403.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
// // @dart=2.14
// ^^^^^^^^^^^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:49:26: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// const f3 = p.F<String>.foo<int>();
// ^^^
//
// pkg/front_end/testcases/regress/issue_34403.dart:51:32: Error: A constructor invocation can't have type arguments after the constructor name.
// Try removing the type arguments or placing them after the class name.
// const f4 = const p.F<String>.foo<int>();
// ^^^
//
import self as self;
import "dart:core" as core;
import "issue_34403_lib.dart" as iss;
import "org-dartlang-testcase:///issue_34403_lib.dart" as p;
class C<T extends core::Object? = dynamic> extends core::Object {
constructor bar() self::C<self::C::T%>
: super core::Object::•()
;
}
class D<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/ {
const constructor foo() self::D<self::D::T%>
: super core::Object::•()
;
}
static method main() dynamic {
self::C<core::int> c1 = new self::C::bar<core::int>();
c1.{core::Object::toString}(){() core::String};
self::C<core::int> c2 = new self::C::bar<core::int>();
c2.{core::Object::toString}(){() core::String};
self::C<core::int> c3 = new self::C::bar<core::int>();
c3.{core::Object::toString}(){() core::String};
self::C<core::String> c4 = new self::C::bar<core::String>();
c4.{core::Object::toString}(){() core::String};
#C1.{core::Object::toString}(){() → core::String};
#C1.{core::Object::toString}(){() → core::String};
#C1.{core::Object::toString}(){() → core::String};
#C2.{core::Object::toString}(){() → core::String};
iss::E<core::int> e1 = new iss::E::bar<core::int>();
e1.{core::Object::toString}(){() core::String};
iss::E<dynamic> e2 = new iss::E::bar<dynamic>();
e2.{core::Object::toString}(){() core::String};
iss::E<core::int> e3 = new iss::E::bar<core::int>();
e3.{core::Object::toString}(){() core::String};
iss::E<core::String> e4 = new iss::E::bar<core::String>();
e4.{core::Object::toString}(){() core::String};
#C3.{core::Object::toString}(){() → core::String};
#C4.{core::Object::toString}(){() → core::String};
#C3.{core::Object::toString}(){() → core::String};
#C5.{core::Object::toString}(){() → core::String};
}
library /*isNonNullableByDefault*/;
import self as iss;
import "dart:core" as core;
class E<T extends core::Object? = dynamic> extends core::Object {
constructor bar() iss::E<iss::E::T%>
: super core::Object::•()
;
}
class F<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/ {
const constructor foo() iss::F<iss::F::T%>
: super core::Object::•()
;
}
constants {
#C1 = self::D<core::int*> {}
#C2 = self::D<core::String*> {}
#C3 = iss::F<core::int*> {}
#C4 = iss::F<dynamic> {}
#C5 = iss::F<core::String*> {}
}
Constructor coverage from constants:
org-dartlang-testcase:///issue_34403.dart:
- D.foo (from org-dartlang-testcase:///issue_34403.dart:14:9)
- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart)
- F.foo (from org-dartlang-testcase:///issue_34403_lib.dart:12:9)