blob: 76a11882ef6c82b4e870477b080ba2253b4d2653 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:21:16: Error: Can't inherit members that conflict with each other.
// abstract class A implements Interface1, Interface2, Interface3 {
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:8:8: Context: This is one inherited member.
// void interfaceMethod1() {}
// ^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:14:7: Context: This is the other inherited member.
// var interfaceMethod1;
// ^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:35:7: Error: The non-abstract class 'MyClass' is missing implementations for these members:
// - A.abstractMethod
// - A.property1=
// - A.property3=
// - Interface1.interfaceMethod1
// - Interface2.interfaceMethod1
// - Interface2.interfaceMethod2
// - Interface3.interfaceMethod3
// Try to either
// - provide an implementation,
// - inherit an implementation from a superclass or mixin,
// - mark the class as abstract, or
// - provide a 'noSuchMethod' implementation.
//
// class MyClass extends B {
// ^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:23:3: Context: 'A.abstractMethod' is defined here.
// abstractMethod();
// ^^^^^^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:24:12: Context: 'A.property1=' is defined here.
// void set property1(_);
// ^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:26:12: Context: 'A.property3=' is defined here.
// void set property3(_);
// ^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:8:8: Context: 'Interface1.interfaceMethod1' is defined here.
// void interfaceMethod1() {}
// ^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:14:7: Context: 'Interface2.interfaceMethod1' is defined here.
// var interfaceMethod1;
// ^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:12:8: Context: 'Interface2.interfaceMethod2' is defined here.
// void interfaceMethod2() {}
// ^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:18:8: Context: 'Interface3.interfaceMethod3' is defined here.
// void interfaceMethod3() {}
// ^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:56:7: Error: The non-abstract class 'MyMock3' is missing implementations for these members:
// - A.abstractMethod
// - A.property1=
// - A.property2=
// - A.property3=
// - Interface1.interfaceMethod1
// - Interface2.interfaceMethod1
// - Interface2.interfaceMethod2
// - Interface3.interfaceMethod3
// Try to either
// - provide an implementation,
// - inherit an implementation from a superclass or mixin,
// - mark the class as abstract, or
// - provide a 'noSuchMethod' implementation.
//
// class MyMock3 extends B {
// ^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:23:3: Context: 'A.abstractMethod' is defined here.
// abstractMethod();
// ^^^^^^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:24:12: Context: 'A.property1=' is defined here.
// void set property1(_);
// ^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:25:12: Context: 'A.property2=' is defined here.
// void set property2(_);
// ^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:26:12: Context: 'A.property3=' is defined here.
// void set property3(_);
// ^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:8:8: Context: 'Interface1.interfaceMethod1' is defined here.
// void interfaceMethod1() {}
// ^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:14:7: Context: 'Interface2.interfaceMethod1' is defined here.
// var interfaceMethod1;
// ^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:12:8: Context: 'Interface2.interfaceMethod2' is defined here.
// void interfaceMethod2() {}
// ^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:18:8: Context: 'Interface3.interfaceMethod3' is defined here.
// void interfaceMethod3() {}
// ^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:66:16: Error: Can't inherit members that conflict with each other.
// abstract class D extends C implements Interface2 {}
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:14:7: Context: This is one inherited member.
// var interfaceMethod1;
// ^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:61:8: Context: This is the other inherited member.
// void interfaceMethod1(_) {}
// ^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:74:16: Error: Can't inherit members that conflict with each other.
// abstract class F extends E implements Interface1 {}
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:8:8: Context: This is one inherited member.
// void interfaceMethod1() {}
// ^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:69:12: Context: This is the other inherited member.
// void set interfaceMethod1(_) {}
// ^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:86:16: Error: Can't inherit members that conflict with each other.
// abstract class H extends G implements Foo {}
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:77:8: Context: This is one inherited member.
// void foo() {}
// ^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:81:14: Context: This is the other inherited member.
// Object get foo => null;
// ^^^
//
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:98:16: Error: Can't inherit members that conflict with each other.
// abstract class J extends I implements Bar {}
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:89:14: Context: This is one inherited member.
// Object get foo => null;
// ^^^
// pkg/front_end/testcases/general_nnbd_opt_out/abstract_members.dart:93:10: Context: This is the other inherited member.
// Object foo() {}
// ^^^
//
import self as self;
import "dart:core" as core;
class Interface1 extends core::Object {
synthetic constructor •() self::Interface1*
;
method interfaceMethod1() void
;
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic;
abstract member-signature get _identityHashCode() core::int*;
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*;
abstract member-signature operator ==(dynamic other) core::bool*;
abstract member-signature get hashCode() core::int*;
abstract member-signature method toString() core::String*;
abstract member-signature get runtimeType() core::Type*;
}
class Interface2 extends core::Object {
field dynamic interfaceMethod1;
synthetic constructor •() self::Interface2*
;
method interfaceMethod2() void
;
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic;
abstract member-signature get _identityHashCode() core::int*;
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*;
abstract member-signature operator ==(dynamic other) core::bool*;
abstract member-signature get hashCode() core::int*;
abstract member-signature method toString() core::String*;
abstract member-signature get runtimeType() core::Type*;
}
class Interface3 extends core::Object {
synthetic constructor •() self::Interface3*
;
method interfaceMethod3() void
;
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic;
abstract member-signature get _identityHashCode() core::int*;
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*;
abstract member-signature operator ==(dynamic other) core::bool*;
abstract member-signature get hashCode() core::int*;
abstract member-signature method toString() core::String*;
abstract member-signature get runtimeType() core::Type*;
}
abstract class A extends core::Object implements self::Interface1, self::Interface2, self::Interface3 {
synthetic constructor •() self::A*
;
method aMethod() dynamic
;
abstract method abstractMethod() dynamic;
abstract set property1(dynamic _) void;
abstract set property2(dynamic _) void;
abstract set property3(dynamic _) void;
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic;
abstract member-signature get _identityHashCode() core::int*;
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*;
abstract member-signature operator ==(dynamic other) core::bool*;
abstract member-signature get hashCode() core::int*;
abstract member-signature method toString() core::String*;
abstract member-signature get runtimeType() core::Type*;
}
abstract class B extends self::A {
final field dynamic property1;
synthetic constructor •() self::B*
;
method aMethod() dynamic
;
method bMethod() dynamic
;
}
class MyClass extends self::B {
field dynamic property2;
synthetic constructor •() self::MyClass*
;
method aaMethod() dynamic
;
method aMethod() dynamic
;
method bMethod() dynamic
;
method cMethod() dynamic
;
}
class MyMock1 extends self::B {
synthetic constructor •() self::MyMock1*
;
method noSuchMethod(core::Invocation* _) dynamic
;
no-such-method-forwarder method interfaceMethod2() void
return this.{self::MyMock1::noSuchMethod}(new core::_InvocationMirror::_withType(#interfaceMethod2, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{})));
no-such-method-forwarder method abstractMethod() dynamic
return this.{self::MyMock1::noSuchMethod}(new core::_InvocationMirror::_withType(#abstractMethod, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))) as{TypeError,ForDynamic} dynamic;
no-such-method-forwarder method interfaceMethod1() void
return this.{self::MyMock1::noSuchMethod}(new core::_InvocationMirror::_withType(#interfaceMethod1, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{})));
no-such-method-forwarder method interfaceMethod3() void
return this.{self::MyMock1::noSuchMethod}(new core::_InvocationMirror::_withType(#interfaceMethod3, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{})));
no-such-method-forwarder set property3(dynamic _) void
return this.{self::MyMock1::noSuchMethod}(new core::_InvocationMirror::_withType(#property3=, 2, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{})));
no-such-method-forwarder set interfaceMethod1(dynamic value) void
return this.{self::MyMock1::noSuchMethod}(new core::_InvocationMirror::_withType(#interfaceMethod1=, 2, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{})));
no-such-method-forwarder set property1(dynamic _) void
return this.{self::MyMock1::noSuchMethod}(new core::_InvocationMirror::_withType(#property1=, 2, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{})));
no-such-method-forwarder set property2(dynamic _) void
return this.{self::MyMock1::noSuchMethod}(new core::_InvocationMirror::_withType(#property2=, 2, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{})));
}
class MyMock2 extends self::MyMock1 {
synthetic constructor •() self::MyMock2*
;
abstract method noSuchMethod(core::Invocation* _) dynamic;
}
class MyMock3 extends self::B {
synthetic constructor •() self::MyMock3*
;
abstract method noSuchMethod(core::Invocation* _) dynamic;
}
class C extends core::Object {
synthetic constructor •() self::C*
;
method interfaceMethod1(dynamic _) void
;
abstract member-signature get _identityHashCode() core::int*;
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*;
abstract member-signature operator ==(dynamic other) core::bool*;
abstract member-signature get hashCode() core::int*;
abstract member-signature method toString() core::String*;
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic;
abstract member-signature get runtimeType() core::Type*;
}
abstract class D extends self::C implements self::Interface2 {
synthetic constructor •() self::D*
;
}
class E extends core::Object {
synthetic constructor •() self::E*
;
set interfaceMethod1(dynamic _) void
;
abstract member-signature get _identityHashCode() core::int*;
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*;
abstract member-signature operator ==(dynamic other) core::bool*;
abstract member-signature get hashCode() core::int*;
abstract member-signature method toString() core::String*;
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic;
abstract member-signature get runtimeType() core::Type*;
}
abstract class F extends self::E implements self::Interface1 {
synthetic constructor •() self::F*
;
}
class Foo extends core::Object {
synthetic constructor •() self::Foo*
;
method foo() void
;
abstract member-signature get _identityHashCode() core::int*;
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*;
abstract member-signature operator ==(dynamic other) core::bool*;
abstract member-signature get hashCode() core::int*;
abstract member-signature method toString() core::String*;
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic;
abstract member-signature get runtimeType() core::Type*;
}
class G extends core::Object {
synthetic constructor •() self::G*
;
get foo() core::Object*
;
abstract member-signature get _identityHashCode() core::int*;
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*;
abstract member-signature operator ==(dynamic other) core::bool*;
abstract member-signature get hashCode() core::int*;
abstract member-signature method toString() core::String*;
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic;
abstract member-signature get runtimeType() core::Type*;
}
abstract class H extends self::G implements self::Foo {
synthetic constructor •() self::H*
;
}
class Bar extends core::Object {
synthetic constructor •() self::Bar*
;
get foo() core::Object*
;
abstract member-signature get _identityHashCode() core::int*;
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*;
abstract member-signature operator ==(dynamic other) core::bool*;
abstract member-signature get hashCode() core::int*;
abstract member-signature method toString() core::String*;
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic;
abstract member-signature get runtimeType() core::Type*;
}
class I extends core::Object {
synthetic constructor •() self::I*
;
method foo() core::Object*
;
abstract member-signature get _identityHashCode() core::int*;
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*;
abstract member-signature operator ==(dynamic other) core::bool*;
abstract member-signature get hashCode() core::int*;
abstract member-signature method toString() core::String*;
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic;
abstract member-signature get runtimeType() core::Type*;
}
abstract class J extends self::I implements self::Bar {
synthetic constructor •() self::J*
;
}
static method main() dynamic
;