blob: cff6670c27597c6328d4351bb652f5e1d7810385 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/general/redirecting_factory.dart:7:28: Error: The constructor function type 'Foo<Tf> Function(int)' isn't a subtype of 'FooBase<Tf> Function(int)'.
// - 'Foo' is from 'pkg/front_end/testcases/general/redirecting_factory.dart'.
// - 'FooBase' is from 'pkg/front_end/testcases/general/redirecting_factory.dart'.
// factory FooBase(int x) = Foo<Tf>;
// ^
//
import self as self;
import "dart:core" as core;
abstract class FooBase<Tf extends core::Object? = dynamic> extends core::Object {
static final field dynamic _redirecting# = <dynamic>[self::FooBase::•]/*isLegacy*/;
abstract get x() core::int;
static factory •<Tf extends core::Object? = dynamic>(core::int x) self::FooBase<self::FooBase::•::Tf%>
return invalid-expression "pkg/front_end/testcases/general/redirecting_factory.dart:7:28: Error: The constructor function type 'Foo<Tf> Function(int)' isn't a subtype of 'FooBase<Tf> Function(int)'.
- 'Foo' is from 'pkg/front_end/testcases/general/redirecting_factory.dart'.
- 'FooBase' is from 'pkg/front_end/testcases/general/redirecting_factory.dart'.
factory FooBase(int x) = Foo<Tf>;
^";
}
abstract class Foo<T extends core::Object? = dynamic> extends core::Object implements self::FooBase<dynamic> {
static final field dynamic _redirecting# = <dynamic>[self::Foo::•]/*isLegacy*/;
static factory •<T extends core::Object? = dynamic>(core::int x) self::Foo<self::Foo::•::T%>
return new self::Bar::•<core::String, self::Foo::•::T%>(x);
}
class Bar<Sb extends core::Object? = dynamic, Tb extends core::Object? = dynamic> extends core::Object implements self::Foo<self::Bar::Tb%> {
field core::int x;
constructor •(core::int x) self::Bar<self::Bar::Sb%, self::Bar::Tb%>
;
}
class Builder<X extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() self::Builder<self::Builder::X%>
;
method method() dynamic
;
}
class SimpleCase<A extends core::Object? = dynamic, B extends core::Object? = dynamic> extends core::Object {
static final field dynamic _redirecting# = <dynamic>[self::SimpleCase::•]/*isLegacy*/;
static factory •<A extends core::Object? = dynamic, B extends core::Object? = dynamic>() self::SimpleCase<self::SimpleCase::•::A%, self::SimpleCase::•::B%>
return self::SimpleCaseImpl::•<self::SimpleCase::•::A%, self::SimpleCase::•::B%>();
}
class SimpleCaseImpl<Ai extends core::Object? = dynamic, Bi extends core::Object? = dynamic> extends core::Object implements self::SimpleCase<self::SimpleCaseImpl::Ai%, self::SimpleCaseImpl::Bi%> {
static final field dynamic _redirecting# = <dynamic>[self::SimpleCaseImpl::•]/*isLegacy*/;
static factory •<Ai extends core::Object? = dynamic, Bi extends core::Object? = dynamic>() self::SimpleCaseImpl<self::SimpleCaseImpl::•::Ai%, self::SimpleCaseImpl::•::Bi%>
return new self::SimpleCaseImpl2::•<self::SimpleCaseImpl::•::Ai%, self::SimpleCaseImpl::•::Bi%>();
}
class SimpleCaseImpl2<Ai2 extends core::Object? = dynamic, Bi2 extends core::Object? = dynamic> extends core::Object implements self::SimpleCaseImpl<self::SimpleCaseImpl2::Ai2%, self::SimpleCaseImpl2::Bi2%> {
synthetic constructor •() self::SimpleCaseImpl2<self::SimpleCaseImpl2::Ai2%, self::SimpleCaseImpl2::Bi2%>
;
}
class Base<M extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() self::Base<self::Base::M%>
;
}
class Mixin<M extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() self::Mixin<self::Mixin::M%>
;
}
class Mix<M extends core::Object? = dynamic> = self::Base<self::Mix::M%> with self::Mixin<self::Mix::M%> {
synthetic constructor •() self::Mix<self::Mix::M%>
: super self::Base::•()
;
}
static method main() dynamic
;
Extra constant evaluation status:
Evaluated: ConstructorTearOff @ org-dartlang-testcase:///redirecting_factory.dart:5:16 -> ConstructorTearOffConstant(FooBase.)
Evaluated: ConstructorTearOff @ org-dartlang-testcase:///redirecting_factory.dart:10:16 -> ConstructorTearOffConstant(Foo.)
Evaluated: ConstructorTearOff @ org-dartlang-testcase:///redirecting_factory.dart:27:7 -> ConstructorTearOffConstant(SimpleCase.)
Evaluated: ConstructorTearOff @ org-dartlang-testcase:///redirecting_factory.dart:31:7 -> ConstructorTearOffConstant(SimpleCaseImpl.)
Extra constant evaluation: evaluated: 12, effectively constant: 4