blob: 71f6cda276ebb8296568065d72bf0d14ebafa913 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/generic_metadata/generic_metadata.dart:21:2: Error: Expected 1 type arguments.
// @A<int, num>() // error
// ^
// pkg/front_end/testcases/generic_metadata/generic_metadata.dart:6:9: Context: Found this candidate, but the arguments don't match.
// const A();
// ^
//
// pkg/front_end/testcases/generic_metadata/generic_metadata.dart:22:2: Error: Expected 2 type arguments.
// @B<int>() // error
// ^
// pkg/front_end/testcases/generic_metadata/generic_metadata.dart:10:9: Context: Found this candidate, but the arguments don't match.
// const B();
// ^
//
// pkg/front_end/testcases/generic_metadata/generic_metadata.dart:23:2: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'C'.
// Try changing type arguments so that they conform to the bounds.
// @C<String>() // error
// ^
// pkg/front_end/testcases/generic_metadata/generic_metadata.dart:13:9: Context: This is the type variable whose bound isn't conformed to.
// class C<T extends num> {
// ^
//
// pkg/front_end/testcases/generic_metadata/generic_metadata.dart:24:2: Error: Type argument 'num' doesn't conform to the bound 'S' of the type variable 'T' on 'D'.
// Try changing type arguments so that they conform to the bounds.
// @D<int, num>() // error
// ^
// pkg/front_end/testcases/generic_metadata/generic_metadata.dart:17:24: Context: This is the type variable whose bound isn't conformed to.
// class D<S extends num, T extends S> {
// ^
//
import self as self;
import "dart:core" as core;
class A<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/ {
const constructor •() self::A<self::A::T%>
: super core::Object::•()
;
}
class B<S extends core::Object? = dynamic, T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/ {
const constructor •() self::B<self::B::S%, self::B::T%>
: super core::Object::•()
;
}
class C<T extends core::num> extends core::Object /*hasConstConstructor*/ {
const constructor •() self::C<self::C::T>
: super core::Object::•()
;
}
class D<S extends core::num, T extends self::D::S = core::num> extends core::Object /*hasConstConstructor*/ {
const constructor •() self::D<self::D::S, self::D::T>
: super core::Object::•()
;
}
@invalid-expression "pkg/front_end/testcases/generic_metadata/generic_metadata.dart:21:2: Error: Expected 1 type arguments.
@A<int, num>() // error
^"
@invalid-expression "pkg/front_end/testcases/generic_metadata/generic_metadata.dart:22:2: Error: Expected 2 type arguments.
@B<int>() // error
^"
@self::C::•<core::String>()
@self::D::•<core::int, core::num>()
static method test() dynamic
;
@self::A::•<dynamic>()
@self::A::•<core::int>()
@self::B::•<dynamic, dynamic>()
@self::B::•<core::int, core::String>()
@self::C::•<core::num>()
@self::C::•<core::num>()
@self::C::•<core::int>()
@self::D::•<core::num, core::num>()
@self::D::•<core::num, core::num>()
@self::D::•<core::num, core::int>()
static method main() dynamic
;
Extra constant evaluation status:
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_metadata.dart:23:2 -> InstanceConstant(const C<String*>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_metadata.dart:24:2 -> InstanceConstant(const D<int*, num*>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_metadata.dart:27:2 -> InstanceConstant(const A<dynamic>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_metadata.dart:28:2 -> InstanceConstant(const A<int*>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_metadata.dart:29:2 -> InstanceConstant(const B<dynamic, dynamic>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_metadata.dart:30:2 -> InstanceConstant(const B<int*, String*>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_metadata.dart:31:2 -> InstanceConstant(const C<num*>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_metadata.dart:32:2 -> InstanceConstant(const C<num*>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_metadata.dart:33:2 -> InstanceConstant(const C<int*>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_metadata.dart:34:2 -> InstanceConstant(const D<num*, num*>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_metadata.dart:35:2 -> InstanceConstant(const D<num*, num*>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_metadata.dart:36:2 -> InstanceConstant(const D<num*, int*>{})
Extra constant evaluation: evaluated: 12, effectively constant: 12