blob: 66b9517f3419d8d2018040ecee1562d44942075e [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
// A Function() test2() => A.foo2; // Error.
// ^
//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:27: Error: Getter not found: 'new'.
// A Function() test3() => A.new; // Ok.
// ^^^
//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:14:30: Error: Getter not found: 'new'.
// A Function(int) test4() => A.new; // Error.
// ^^^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
constructor foo1() self::A
: super core::Object::•() {}
constructor foo2(core::int x) self::A
: super core::Object::•() {}
constructor •() self::A
: super core::Object::•() {}
}
static method test1() () self::A
return self::A::foo1;
static method test2() () self::A
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function() test2() => A.foo2; // Error.
^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} () → self::A;
static method test3() → () → self::A
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:27: Error: Getter not found: 'new'.
A Function() test3() => A.new; // Ok.
^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} () → self::A;
static method test4() → (core::int) → self::A
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:14:30: Error: Getter not found: 'new'.
A Function(int) test4() => A.new; // Error.
^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::int) → self::A;
static method main() → dynamic {}