blob: 71759ac68f73ab5799358d998bd69e90b381c4d4 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd_mixed/generic_override.dart:39:8: Error: Declared bound 'Object?' of type variable 'T' of 'Class2.method4b' doesn't match the bound 'Object' on overridden method 'Class1.method4b'.
// - 'Object' is from 'dart:core'.
// void method4b<T extends Object?>(); // error
// ^
// pkg/front_end/testcases/nnbd_mixed/generic_override.dart:19:8: Context: This is the overridden method ('method4b').
// void method4b<T extends Object>();
// ^
//
// pkg/front_end/testcases/nnbd_mixed/generic_override.dart:40:8: Error: Declared bound 'Object' of type variable 'T' of 'Class2.method4c' doesn't match the bound 'Object?' on overridden method 'Class1.method4c'.
// - 'Object' is from 'dart:core'.
// void method4c<T extends Object>(); // error
// ^
// pkg/front_end/testcases/nnbd_mixed/generic_override.dart:20:8: Context: This is the overridden method ('method4c').
// void method4c<T extends Object?>();
// ^
//
// pkg/front_end/testcases/nnbd_mixed/generic_override.dart:43:8: Error: Declared bound 'Class1?' of type variable 'T' of 'Class2.method5b' doesn't match the bound 'Class1' on overridden method 'Class1.method5b'.
// - 'Class1' is from 'pkg/front_end/testcases/nnbd_mixed/generic_override.dart'.
// void method5b<T extends Class1?>(); // error
// ^
// pkg/front_end/testcases/nnbd_mixed/generic_override.dart:23:8: Context: This is the overridden method ('method5b').
// void method5b<T extends Class1>();
// ^
//
// pkg/front_end/testcases/nnbd_mixed/generic_override.dart:44:8: Error: Declared bound 'Class1' of type variable 'T' of 'Class2.method5c' doesn't match the bound 'Class1?' on overridden method 'Class1.method5c'.
// - 'Class1' is from 'pkg/front_end/testcases/nnbd_mixed/generic_override.dart'.
// void method5c<T extends Class1>(); // error
// ^
// pkg/front_end/testcases/nnbd_mixed/generic_override.dart:24:8: Context: This is the overridden method ('method5c').
// void method5c<T extends Class1?>();
// ^
//
import self as self;
import "dart:core" as core;
import "generic_override_lib.dart" as gen;
import "org-dartlang-testcase:///generic_override_lib.dart";
abstract class Class1 extends core::Object {
synthetic constructor •() self::Class1
: super core::Object::•()
;
abstract method method1a<T extends core::Object? = dynamic>() void;
abstract method method1b<T extends core::Object? = dynamic>() void;
abstract method method1c<T extends core::Object? = dynamic>() void;
abstract method method2a<T extends core::Object?>() void;
abstract method method2b<T extends core::Object?>() void;
abstract method method2c<T extends core::Object?>() void;
abstract method method3a<T extends dynamic>() void;
abstract method method3b<T extends dynamic>() void;
abstract method method3c<T extends dynamic>() void;
abstract method method4a<T extends core::Object>() void;
abstract method method4b<T extends core::Object>() void;
abstract method method4c<T extends core::Object?>() void;
abstract method method5a<T extends self::Class1>() void;
abstract method method5b<T extends self::Class1>() void;
abstract method method5c<T extends self::Class1?>() void;
}
abstract class Class2 extends self::Class1 {
synthetic constructor •() self::Class2
: super self::Class1::•()
;
abstract method method1a<T extends core::Object? = dynamic>() void;
abstract method method1b<T extends core::Object?>() void;
abstract method method1c<T extends dynamic>() void;
abstract method method2a<T extends core::Object? = dynamic>() void;
abstract method method2b<T extends core::Object?>() void;
abstract method method2c<T extends dynamic>() void;
abstract method method3a<T extends core::Object? = dynamic>() void;
abstract method method3b<T extends core::Object?>() void;
abstract method method3c<T extends dynamic>() void;
abstract method method4a<T extends core::Object>() void;
abstract method method4b<T extends core::Object?>() void;
abstract method method4c<T extends core::Object>() void;
abstract method method5a<T extends self::Class1>() void;
abstract method method5b<T extends self::Class1?>() void;
abstract method method5c<T extends self::Class1>() void;
}
abstract class Class3 extends gen::LegacyClass1 {
synthetic constructor •() self::Class3
: super gen::LegacyClass1::•()
;
abstract method method1a<T extends core::Object? = dynamic>() void;
abstract method method1b<T extends core::Object?>() void;
abstract method method1c<T extends dynamic>() void;
abstract method method2a<T extends core::Object? = dynamic>() void;
abstract method method2b<T extends core::Object?>() void;
abstract method method2c<T extends dynamic>() void;
abstract method method3a<T extends core::Object? = dynamic>() void;
abstract method method3b<T extends core::Object?>() void;
abstract method method3c<T extends dynamic>() void;
abstract method method4a<T extends core::Object>() void;
abstract method method4b<T extends core::Object?>() void;
abstract method method4c<T extends core::Object>() void;
abstract method method5a<T extends self::Class1>() void;
abstract method method5b<T extends self::Class1?>() void;
abstract method method5c<T extends self::Class1>() void;
}
static method main() dynamic {}
library;
import self as gen;
import "dart:core" as core;
import "generic_override.dart" as self;
import "org-dartlang-testcase:///generic_override.dart";
abstract class LegacyClass1 extends core::Object {
synthetic constructor •() gen::LegacyClass1*
: super core::Object::•()
;
abstract method method1a<T extends core::Object* = dynamic>() void;
abstract method method1b<T extends core::Object* = dynamic>() void;
abstract method method1c<T extends core::Object* = dynamic>() void;
abstract method method2a<T extends core::Object*>() void;
abstract method method2b<T extends core::Object*>() void;
abstract method method2c<T extends core::Object*>() void;
abstract method method3a<T extends dynamic>() void;
abstract method method3b<T extends dynamic>() void;
abstract method method3c<T extends dynamic>() void;
abstract method method4a<T extends core::Object*>() void;
abstract method method4b<T extends core::Object*>() void;
abstract method method4c<T extends core::Object*>() void;
abstract method method5a<T extends self::Class1*>() void;
abstract method method5b<T extends self::Class1*>() void;
abstract method method5c<T extends self::Class1*>() void;
abstract member-signature get _identityHashCode() core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) core::bool*; -> core::Object::==
abstract member-signature get hashCode() core::int*; -> core::Object::hashCode
abstract member-signature method toString() core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() core::Type*; -> core::Object::runtimeType
}
abstract class LegacyClass2 extends self::Class1 {
synthetic constructor •() gen::LegacyClass2*
: super self::Class1::•()
;
abstract method method1a<T extends core::Object* = dynamic>() void;
abstract method method1b<T extends core::Object*>() void;
abstract method method1c<T extends dynamic>() void;
abstract method method2a<T extends core::Object* = dynamic>() void;
abstract method method2b<T extends core::Object*>() void;
abstract method method2c<T extends dynamic>() void;
abstract method method3a<T extends core::Object* = dynamic>() void;
abstract method method3b<T extends core::Object*>() void;
abstract method method3c<T extends dynamic>() void;
abstract method method4a<T extends core::Object*>() void;
abstract method method4b<T extends core::Object*>() void;
abstract method method4c<T extends core::Object*>() void;
abstract method method5a<T extends self::Class1*>() void;
abstract method method5b<T extends self::Class1*>() void;
abstract method method5c<T extends self::Class1*>() void;
abstract member-signature get _identityHashCode() core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) core::bool*; -> core::Object::==
abstract member-signature get hashCode() core::int*; -> core::Object::hashCode
abstract member-signature method toString() core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() core::Type*; -> core::Object::runtimeType
}
abstract class LegacyClass3 extends self::Class1 {
synthetic constructor •() gen::LegacyClass3*
: super self::Class1::•()
;
abstract member-signature get _identityHashCode() core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) core::bool*; -> core::Object::==
abstract member-signature get hashCode() core::int*; -> core::Object::hashCode
abstract member-signature method toString() core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() core::Type*; -> core::Object::runtimeType
abstract member-signature method method1a<T extends core::Object* = dynamic>() void; -> self::Class1::method1a
abstract member-signature method method1b<T extends core::Object* = dynamic>() void; -> self::Class1::method1b
abstract member-signature method method1c<T extends core::Object* = dynamic>() void; -> self::Class1::method1c
abstract member-signature method method2a<T extends core::Object*>() void; -> self::Class1::method2a
abstract member-signature method method2b<T extends core::Object*>() void; -> self::Class1::method2b
abstract member-signature method method2c<T extends core::Object*>() void; -> self::Class1::method2c
abstract member-signature method method4a<T extends core::Object*>() void; -> self::Class1::method4a
abstract member-signature method method4b<T extends core::Object*>() void; -> self::Class1::method4b
abstract member-signature method method4c<T extends core::Object*>() void; -> self::Class1::method4c
abstract member-signature method method5a<T extends self::Class1*>() void; -> self::Class1::method5a
abstract member-signature method method5b<T extends self::Class1*>() void; -> self::Class1::method5b
abstract member-signature method method5c<T extends self::Class1*>() void; -> self::Class1::method5c
}
static method main() dynamic {}