blob: 0954a14e94758b5fa44d9393a08c4e8778e52b4d [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/general/constants/issue46925.dart:14:21: 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 v1 = MyClass<String>.new;
// ^
// pkg/front_end/testcases/general/constants/issue46925.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/general/constants/issue46925.dart:14:30: 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 v1 = MyClass<String>.new;
// ^^^
// pkg/front_end/testcases/general/constants/issue46925.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/general/constants/issue46925.dart:14:30: Error: Member not found: 'new'.
// const v1 = MyClass<String>.new;
// ^^^
//
// pkg/front_end/testcases/general/constants/issue46925.dart:15:21: 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 v2 = MyClass<int>.constr;
// ^
// pkg/front_end/testcases/general/constants/issue46925.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/general/constants/issue46925.dart:15:27: Error: Member not found: 'constr'.
// const v2 = MyClass<int>.constr;
// ^^^^^^
//
// pkg/front_end/testcases/general/constants/issue46925.dart:16:21: 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 v3 = MyClass<int>.new;
// ^
// pkg/front_end/testcases/general/constants/issue46925.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/general/constants/issue46925.dart:16:27: 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 v3 = MyClass<int>.new;
// ^^^
// pkg/front_end/testcases/general/constants/issue46925.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/general/constants/issue46925.dart:16:27: Error: Member not found: 'new'.
// const v3 = MyClass<int>.new;
// ^^^
//
// pkg/front_end/testcases/general/constants/issue46925.dart:17:21: 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 v4 = MyClass<String>.constr;
// ^
// pkg/front_end/testcases/general/constants/issue46925.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/general/constants/issue46925.dart:17:30: Error: Member not found: 'constr'.
// const v4 = MyClass<String>.constr;
// ^^^^^^
//
import self as self;
import "dart:core" as core;
class MyClass<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/ {
final field dynamic a;
const constructor •(core::int i, core::int j) self::MyClass<self::MyClass::T%>
: self::MyClass::a = i.{core::num::+}(j){(core::num) core::int}, super core::Object::•()
;
const constructor constr() self::MyClass<self::MyClass::T%>
: self::MyClass::a = 0, super core::Object::•()
;
}
static method test() dynamic {
const invalid-type v1 = invalid-expression "pkg/front_end/testcases/general/constants/issue46925.dart:14:30: Error: Member not found: 'new'.
const v1 = MyClass<String>.new;
^^^";
const invalid-type v2 = invalid-expression "pkg/front_end/testcases/general/constants/issue46925.dart:15:27: Error: Member not found: 'constr'.
const v2 = MyClass<int>.constr;
^^^^^^";
const invalid-type v3 = invalid-expression "pkg/front_end/testcases/general/constants/issue46925.dart:16:27: Error: Member not found: 'new'.
const v3 = MyClass<int>.new;
^^^";
const invalid-type v4 = invalid-expression "pkg/front_end/testcases/general/constants/issue46925.dart:17:30: Error: Member not found: 'constr'.
const v4 = MyClass<String>.constr;
^^^^^^";
const dynamic c1 = invalid-expression "pkg/front_end/testcases/general/constants/issue46925.dart:14:30: Error: Member not found: 'new'.
const v1 = MyClass<String>.new;
^^^";
const dynamic c2 = invalid-expression "pkg/front_end/testcases/general/constants/issue46925.dart:14:30: Error: Member not found: 'new'.
const v1 = MyClass<String>.new;
^^^";
const dynamic c3 = invalid-expression "pkg/front_end/testcases/general/constants/issue46925.dart:15:27: Error: Member not found: 'constr'.
const v2 = MyClass<int>.constr;
^^^^^^";
const dynamic c4 = invalid-expression "pkg/front_end/testcases/general/constants/issue46925.dart:15:27: Error: Member not found: 'constr'.
const v2 = MyClass<int>.constr;
^^^^^^";
const dynamic c5 = invalid-expression "pkg/front_end/testcases/general/constants/issue46925.dart:16:27: Error: Member not found: 'new'.
const v3 = MyClass<int>.new;
^^^";
const dynamic c6 = invalid-expression "pkg/front_end/testcases/general/constants/issue46925.dart:17:30: Error: Member not found: 'constr'.
const v4 = MyClass<String>.constr;
^^^^^^";
}
static method main() dynamic {}