blob: a3c5d1d5eb28de8f12c0e02f246987248191c65a [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart:20:5: Error: Expected ';' after this.
// A x3 f3();
// ^^
//
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 •() self::A
: super core::Object::•()
;
static factory redirectingFactory() self::A
let Never #redirecting_factory = self::A::• 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
: super self::A::•()
;
}
static method test() dynamic {
() self::A f1 = #C1;
() self::A f2 = #C2;
() self::A f3 = #C3;
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();
constants {
#C1 = redirecting-factory-tearoff self::A::redirectingFactory
#C2 = redirecting-factory-tearoff self::A::redirectingFactoryChild
#C3 = redirecting-factory-tearoff self::A::redirectingTwice
}