blob: b497969af28ae9a42648b50fdf7f6a2eb8f3b4c1 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/constructor_tearoffs/lowering/const_redirect.dart:15:9: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'ImplAlias'.
// Try changing type arguments so that they conform to the bounds.
// ImplAlias<String>()
// ^
// pkg/front_end/testcases/constructor_tearoffs/lowering/const_redirect.dart:32:19: Context: This is the type variable whose bound isn't conformed to.
// typedef ImplAlias<T extends num> = _ConstImpl<T>;
// ^
//
// pkg/front_end/testcases/constructor_tearoffs/lowering/const_redirect.dart:22:9: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'ImplAlias'.
// Try changing type arguments so that they conform to the bounds.
// ImplAlias<String>()
// ^
// pkg/front_end/testcases/constructor_tearoffs/lowering/const_redirect.dart:32:19: Context: This is the type variable whose bound isn't conformed to.
// typedef ImplAlias<T extends num> = _ConstImpl<T>;
// ^
//
import self as self;
import "dart:core" as core;
typedef Alias = self::Const;
typedef ImplAlias<T extends core::num> = self::_ConstImpl<T>;
class Class extends core::Object /*hasConstConstructor*/ {
final field core::List<self::Const> constants;
constructor •({core::List<self::Const> constants = const <self::Const>[const self::_ConstImpl::•<dynamic>(), const self::_ConstImpl::•<dynamic>(), const self::_ConstImpl::•<core::String>()]}) self::Class
;
const constructor named({core::List<self::Const> constants = const <self::Const>[const self::_ConstImpl::•<dynamic>(), const self::_ConstImpl::•<dynamic>(), const self::_ConstImpl::•<core::String>()]}) self::Class
: self::Class::constants = constants, super core::Object::•()
;
static method _#new#tearOff({core::List<self::Const> constants}) → self::Class
return new self::Class::•(constants: constants);
static method _#named#tearOff({core::List<self::Const> constants}) → self::Class
return new self::Class::named(constants: constants);
}
abstract class Const extends core::Object {
static final field dynamic _redirecting# = <dynamic>[self::Const::impl]/*isLegacy*/;
static factory impl() self::Const
return new self::_ConstImpl::•<dynamic>();
static method _#impl#tearOff() → self::Const
return new self::_ConstImpl::•<dynamic>();
}
class _ConstImpl<T extends core::Object? = dynamic> extends core::Object implements self::Const /*hasConstConstructor*/ {
const constructor •() self::_ConstImpl<self::_ConstImpl::T%>
: super core::Object::•()
;
static method _#new#tearOff<T extends core::Object? = dynamic>() → self::_ConstImpl<self::_ConstImpl::_#new#tearOff::T%>
return new self::_ConstImpl::•<self::_ConstImpl::_#new#tearOff::T%>();
}
static method main() dynamic
;
static method _#ImplAlias#new#tearOff<T extends core::num>() → self::_ConstImpl<self::_#ImplAlias#new#tearOff::T>
return new self::_ConstImpl::•<self::_#ImplAlias#new#tearOff::T>();
Extra constant evaluation status:
Evaluated: ListLiteral @ org-dartlang-testcase:///const_redirect.dart:12:25 -> ListConstant(const <Const*>[const _ConstImpl<dynamic>{}, const _ConstImpl<dynamic>{}, const _ConstImpl<String*>{}])
Evaluated: ListLiteral @ org-dartlang-testcase:///const_redirect.dart:19:25 -> ListConstant(const <Const*>[const _ConstImpl<dynamic>{}, const _ConstImpl<dynamic>{}, const _ConstImpl<String*>{}])
Evaluated: ConstructorTearOff @ org-dartlang-testcase:///const_redirect.dart:28:16 -> ConstructorTearOffConstant(Const.impl)
Extra constant evaluation: evaluated: 13, effectively constant: 3