blob: f6db3b260ff7195685cd837a1d0f13ceeac29056 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
// Try changing the operand or remove the type arguments.
// testFooExtraArgs() => A<int>.foo; // Error.
// ^
//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:16:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
// Try changing the operand or remove the type arguments.
// testNewExtraArgs() => A<int>.new; // Error.
// ^
//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:17:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
// Try changing the operand or remove the type arguments.
// testBarExtraArgs() => A<int>.bar; // Error.
// ^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
constructor foo() self::A
: super core::Object::•() {}
constructor •() self::A
: super core::Object::•() {}
static factory bar() self::A
return new self::A::•();
}
static method testFoo() dynamic
return self::A::foo;
static method testNew() dynamic
return self::A::•;
static method testBar() dynamic
return self::A::bar;
static method testFooExtraArgs() dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
Try changing the operand or remove the type arguments.
testFooExtraArgs() => A<int>.foo; // Error.
^";
static method testNewExtraArgs() dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:16:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
Try changing the operand or remove the type arguments.
testNewExtraArgs() => A<int>.new; // Error.
^";
static method testBarExtraArgs() dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:17:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
Try changing the operand or remove the type arguments.
testBarExtraArgs() => A<int>.bar; // Error.
^";
static method main() dynamic {}