blob: 943d69c5ad9fde2a95031b74925b956a8efd8bf3 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart:6:5: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// A.new();
// ^^^
//
// pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart:7:38: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// factory A.redirectingFactory() = A.new;
// ^^^
//
// pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart:8:43: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// factory A.redirectingFactoryChild() = B.new;
// ^^^
//
// pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart:7:36: Error: Redirection constructor target not found: 'A.new'
// factory A.redirectingFactory() = A.new;
// ^
//
// pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart:15:23: Error: Getter not found: 'redirectingFactory'.
// A Function() f1 = A.redirectingFactory;
// ^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart:16:23: Error: Getter not found: 'redirectingFactoryChild'.
// A Function() f2 = A.redirectingFactoryChild;
// ^^^^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart:17:23: Error: Getter not found: 'redirectingTwice'.
// A Function() f3 = A.redirectingTwice;
// ^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart:20:5: Error: Expected ';' after this.
// A x3 f3();
// ^^
//
// pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart:12:7: Error: The superclass, 'A', has no unnamed constructor that takes no arguments.
// class B extends A {}
// ^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
static final field dynamic _redirecting# = <dynamic>[self::A::redirectingFactory, self::A::redirectingFactoryChild, self::A::redirectingTwice]/*isLegacy*/;
constructor new() self::A
: super core::Object::•()
;
static factory redirectingFactory() self::A
let core::String* #redirecting_factory = "A.new" in invalid-expression;
static factory redirectingFactoryChild() self::A
let Never #redirecting_factory = self::B::• in invalid-expression;
static factory redirectingTwice() self::A
let () self::A #redirecting_factory = self::A::redirectingFactory in invalid-expression;
}
class B extends self::A {
synthetic constructor •() self::B
: invalid-initializer
;
}
static method test() dynamic {
() self::A f1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart:15:23: Error: Getter not found: 'redirectingFactory'.
A Function() f1 = A.redirectingFactory;
^^^^^^^^^^^^^^^^^^";
() self::A f2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart:16:23: Error: Getter not found: 'redirectingFactoryChild'.
A Function() f2 = A.redirectingFactoryChild;
^^^^^^^^^^^^^^^^^^^^^^^";
() self::A f3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart:17:23: Error: Getter not found: 'redirectingTwice'.
A Function() f3 = A.redirectingTwice;
^^^^^^^^^^^^^^^^";
self::A x1 = f1(){() self::A};
self::B x2 = f2(){() self::A} as{ForNonNullableByDefault} self::B;
self::A x3;
f3(){() self::A};
}
static method main() dynamic
return self::test();