blob: 2c2f8e885863743efa9103c9e5dff25acdf81a41 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/instantiate_to_bound/non_simple_bound_due_to_variables.dart:11:9: Error: Generic type 'A' can't be used without type arguments in a type variable bound.
// Try providing type arguments to 'A' here.
// class B<TypeU extends A> {}
// ^^^^^
// pkg/front_end/testcases/instantiate_to_bound/non_simple_bound_due_to_variables.dart:9:16: Context: Bound of this variable references variable 'TypeT' from the same declaration.
// class A<TypeT, TypeS extends TypeT> {}
// ^^^^^
//
// pkg/front_end/testcases/instantiate_to_bound/non_simple_bound_due_to_variables.dart:15:13: Error: Generic type 'A' can't be used without type arguments in a type variable bound.
// Try providing type arguments to 'A' here.
// extension C<TypeU extends A> on int {}
// ^^^^^
// pkg/front_end/testcases/instantiate_to_bound/non_simple_bound_due_to_variables.dart:9:16: Context: Bound of this variable references variable 'TypeT' from the same declaration.
// class A<TypeT, TypeS extends TypeT> {}
// ^^^^^
//
// pkg/front_end/testcases/instantiate_to_bound/non_simple_bound_due_to_variables.dart:17:11: Error: Generic type 'A' can't be used without type arguments in a type variable bound.
// Try providing type arguments to 'A' here.
// typedef D<TypeU extends A> = int;
// ^^^^^
// pkg/front_end/testcases/instantiate_to_bound/non_simple_bound_due_to_variables.dart:9:16: Context: Bound of this variable references variable 'TypeT' from the same declaration.
// class A<TypeT, TypeS extends TypeT> {}
// ^^^^^
//
import self as self;
import "dart:core" as core;
typedef D<unrelated TypeU extends self::A<dynamic, dynamic> = dynamic> = core::int;
class A<TypeT extends core::Object? = dynamic, TypeS extends self::A::TypeT% = dynamic> extends core::Object {
synthetic constructor •() self::A<self::A::TypeT%, self::A::TypeS%>
: super core::Object::•()
;
}
class B<TypeU extends self::A<dynamic, dynamic> = dynamic> extends core::Object {
synthetic constructor •() self::B<self::B::TypeU>
: super core::Object::•()
;
}
extension C<TypeU extends self::A<dynamic, dynamic> = dynamic> on core::int {
}
static field self::B<dynamic> b = throw "";
static method main() dynamic {}
static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm_shared/lib/integers_patch.dart */ _#D#fromEnvironment#tearOff<unrelated TypeU extends self::A<dynamic, dynamic> = dynamic>(core::String name, {core::int defaultValue = #C1}) → core::int
return core::int::fromEnvironment(name, defaultValue: defaultValue);
constants {
#C1 = 0
}