blob: c87e29dac35f3d85ba28deb7b73c06307874f1e2 [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:14: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.
// ^
//
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 self::A::•;
static method test4() → (core::int) → self::A
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:14: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 self::A::• as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
static method main() → dynamic {}