blob: dfb83e120f8d04bb23f7cf4e53cc59e0e4fb6046 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13: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:15:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
// A Function(int) test4() => A.new; // Error.
// ^
//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:17:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
// A Function(int) test6() => A.bar1; // 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 factory bar1() self::A
return new self::A::•();
}
static method test1() () self::A
return #C1;
static method test2() () self::A
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13: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 (#C2) as{TypeError,ForNonNullableByDefault} () self::A;
static method test3() () self::A
return #C3;
static method test4() (core::int) self::A
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:15:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function(int) test4() => A.new; // Error.
^" in (#C3) as{TypeError,ForNonNullableByDefault} (core::int) self::A;
static method test5() () self::A
return #C4;
static method test6() (core::int) self::A
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:17:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function(int) test6() => A.bar1; // Error.
^" in (#C4) as{TypeError,ForNonNullableByDefault} (core::int) self::A;
static method main() dynamic {}
constants {
#C1 = constructor-tearoff self::A::foo1
#C2 = constructor-tearoff self::A::foo2
#C3 = constructor-tearoff self::A::•
#C4 = static-tearoff self::A::bar1
}