blob: 645b3352a74563422d29cde0b5bbc8b0ec7bf46e [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:34:7: Error: The non-abstract class 'ClassImplements' is missing implementations for these members:
// - Interface2.extendedMethod
// - Interface2.mixedInMethod
// - Mixin.mixedInMethod
// - Super with Mixin.mixedInMethod
// - Super.extendedMethod
// 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 ClassImplements implements Interface2 {}
// ^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:19:7: Context: 'Interface2.extendedMethod' is defined here.
// int extendedMethod();
// ^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:20:7: Context: 'Interface2.mixedInMethod' is defined here.
// int mixedInMethod();
// ^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:10:7: Context: 'Mixin.mixedInMethod' is defined here.
// num mixedInMethod() => 0;
// ^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:10:7: Context: 'Super with Mixin.mixedInMethod' is defined here.
// num mixedInMethod() => 0;
// ^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:6:7: Context: 'Super.extendedMethod' is defined here.
// num extendedMethod() => 0;
// ^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:23:7: Error: The implementation of 'mixedInMethod' in the non-abstract class 'ClassExtends' does not conform to its interface.
// class ClassExtends extends Super with Mixin implements Interface1 {}
// ^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:23:7: Context: The return type of the method 'Super with Mixin.mixedInMethod' is 'num', which does not match the return type, 'int', of the overridden method, 'Interface1.mixedInMethod'.
// Change to a subtype of 'int'.
// class ClassExtends extends Super with Mixin implements Interface1 {}
// ^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:15:7: Context: This is the overridden method ('mixedInMethod').
// int mixedInMethod();
// ^
//
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:23:7: Error: The implementation of 'extendedMethod' in the non-abstract class 'ClassExtends' does not conform to its interface.
// class ClassExtends extends Super with Mixin implements Interface1 {}
// ^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:6:7: Context: The return type of the method 'Super.extendedMethod' is 'num', which does not match the return type, 'int', of the overridden method, 'Interface1.extendedMethod'.
// Change to a subtype of 'int'.
// num extendedMethod() => 0;
// ^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:14:7: Context: This is the overridden method ('extendedMethod').
// int extendedMethod();
// ^
//
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:25:7: Error: The implementation of 'mixedInMethod' in the non-abstract class 'ClassExtendsWithNoSuchMethod' does not conform to its interface.
// class ClassExtendsWithNoSuchMethod extends Super
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:25:7: Context: The return type of the method 'Super with Mixin.mixedInMethod' is 'num', which does not match the return type, 'int', of the overridden method, 'Interface1.mixedInMethod'.
// Change to a subtype of 'int'.
// class ClassExtendsWithNoSuchMethod extends Super
// ^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:15:7: Context: This is the overridden method ('mixedInMethod').
// int mixedInMethod();
// ^
//
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:25:7: Error: The implementation of 'extendedMethod' in the non-abstract class 'ClassExtendsWithNoSuchMethod' does not conform to its interface.
// class ClassExtendsWithNoSuchMethod extends Super
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:6:7: Context: The return type of the method 'Super.extendedMethod' is 'num', which does not match the return type, 'int', of the overridden method, 'Interface1.extendedMethod'.
// Change to a subtype of 'int'.
// num extendedMethod() => 0;
// ^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:14:7: Context: This is the overridden method ('extendedMethod').
// int extendedMethod();
// ^
//
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:43:7: Error: The implementation of 'extendedMethod' in the non-abstract class 'ClassDeclaresExtends' does not conform to its interface.
// class ClassDeclaresExtends extends Super with Mixin {
// ^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:6:7: Context: The return type of the method 'Super.extendedMethod' is 'num', which does not match the return type, 'int', of the overridden method, 'ClassDeclaresExtends.extendedMethod'.
// Change to a subtype of 'int'.
// num extendedMethod() => 0;
// ^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:44:7: Context: This is the overridden method ('extendedMethod').
// int extendedMethod();
// ^
//
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:43:7: Error: The implementation of 'mixedInMethod' in the non-abstract class 'ClassDeclaresExtends' does not conform to its interface.
// class ClassDeclaresExtends extends Super with Mixin {
// ^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:43:7: Context: The return type of the method 'Super with Mixin.mixedInMethod' is 'num', which does not match the return type, 'int', of the overridden method, 'ClassDeclaresExtends.mixedInMethod'.
// Change to a subtype of 'int'.
// class ClassDeclaresExtends extends Super with Mixin {
// ^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:45:7: Context: This is the overridden method ('mixedInMethod').
// int mixedInMethod();
// ^
//
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:48:7: Error: The implementation of 'extendedMethod' in the non-abstract class 'ClassDeclaresExtendsWithNoSuchMethod' does not conform to its interface.
// class ClassDeclaresExtendsWithNoSuchMethod extends Super with Mixin {
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:6:7: Context: The return type of the method 'Super.extendedMethod' is 'num', which does not match the return type, 'int', of the overridden method, 'ClassDeclaresExtendsWithNoSuchMethod.extendedMethod'.
// Change to a subtype of 'int'.
// num extendedMethod() => 0;
// ^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:54:7: Context: This is the overridden method ('extendedMethod').
// int extendedMethod();
// ^
//
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:48:7: Error: The implementation of 'mixedInMethod' in the non-abstract class 'ClassDeclaresExtendsWithNoSuchMethod' does not conform to its interface.
// class ClassDeclaresExtendsWithNoSuchMethod extends Super with Mixin {
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:48:7: Context: The return type of the method 'Super with Mixin.mixedInMethod' is 'num', which does not match the return type, 'int', of the overridden method, 'ClassDeclaresExtendsWithNoSuchMethod.mixedInMethod'.
// Change to a subtype of 'int'.
// class ClassDeclaresExtendsWithNoSuchMethod extends Super with Mixin {
// ^
// pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart:55:7: Context: This is the overridden method ('mixedInMethod').
// int mixedInMethod();
// ^
//
import self as self;
import "dart:core" as core;
class Super extends core::Object {
synthetic constructor •() self::Super
;
method extendedMethod() core::num
;
}
class Mixin extends core::Object {
synthetic constructor •() self::Mixin
;
method mixedInMethod() core::num
;
}
abstract class Interface1 extends core::Object {
synthetic constructor •() self::Interface1
;
abstract method extendedMethod() core::int;
abstract method mixedInMethod() core::int;
}
abstract class _Interface2&Super&Mixin = self::Super with self::Mixin /*isAnonymousMixin*/ {
synthetic constructor •() self::_Interface2&Super&Mixin
: super self::Super::•()
;
mixin-super-stub method mixedInMethod() core::num
return super.{self::Mixin::mixedInMethod}();
}
abstract class Interface2 extends self::_Interface2&Super&Mixin {
synthetic constructor •() self::Interface2
;
abstract method extendedMethod() core::int;
abstract method mixedInMethod() core::int;
}
abstract class _ClassExtends&Super&Mixin = self::Super with self::Mixin /*isAnonymousMixin*/ {
synthetic constructor •() self::_ClassExtends&Super&Mixin
: super self::Super::•()
;
mixin-super-stub method mixedInMethod() core::num
return super.{self::Mixin::mixedInMethod}();
}
class ClassExtends extends self::_ClassExtends&Super&Mixin implements self::Interface1 {
synthetic constructor •() self::ClassExtends
;
abstract member-signature method mixedInMethod() core::int; -> self::Interface1::mixedInMethod
abstract member-signature method extendedMethod() core::int; -> self::Interface1::extendedMethod
}
abstract class _ClassExtendsWithNoSuchMethod&Super&Mixin = self::Super with self::Mixin /*isAnonymousMixin*/ {
synthetic constructor •() self::_ClassExtendsWithNoSuchMethod&Super&Mixin
: super self::Super::•()
;
mixin-super-stub method mixedInMethod() core::num
return super.{self::Mixin::mixedInMethod}();
}
class ClassExtendsWithNoSuchMethod extends self::_ClassExtendsWithNoSuchMethod&Super&Mixin implements self::Interface1 {
synthetic constructor •() self::ClassExtendsWithNoSuchMethod
;
@core::override
method noSuchMethod(core::Invocation invocation) dynamic
;
abstract member-signature method mixedInMethod() core::int; -> self::Interface1::mixedInMethod
abstract member-signature method extendedMethod() core::int; -> self::Interface1::extendedMethod
}
class ClassImplements extends core::Object implements self::Interface2 {
synthetic constructor •() self::ClassImplements
;
}
class ClassImplementsWithNoSuchMethod extends core::Object implements self::Interface2 {
synthetic constructor •() self::ClassImplementsWithNoSuchMethod
;
@core::override
method noSuchMethod(core::Invocation invocation) dynamic
;
no-such-method-forwarder method mixedInMethod() core::int
return this.{self::ClassImplementsWithNoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#mixedInMethod, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
no-such-method-forwarder method extendedMethod() core::int
return this.{self::ClassImplementsWithNoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#extendedMethod, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
}
abstract class _ClassDeclaresExtends&Super&Mixin = self::Super with self::Mixin /*isAnonymousMixin*/ {
synthetic constructor •() self::_ClassDeclaresExtends&Super&Mixin
: super self::Super::•()
;
mixin-super-stub method mixedInMethod() core::num
return super.{self::Mixin::mixedInMethod}();
}
class ClassDeclaresExtends extends self::_ClassDeclaresExtends&Super&Mixin {
synthetic constructor •() self::ClassDeclaresExtends
;
abstract method extendedMethod() core::int;
abstract method mixedInMethod() core::int;
}
abstract class _ClassDeclaresExtendsWithNoSuchMethod&Super&Mixin = self::Super with self::Mixin /*isAnonymousMixin*/ {
synthetic constructor •() self::_ClassDeclaresExtendsWithNoSuchMethod&Super&Mixin
: super self::Super::•()
;
mixin-super-stub method mixedInMethod() core::num
return super.{self::Mixin::mixedInMethod}();
}
class ClassDeclaresExtendsWithNoSuchMethod extends self::_ClassDeclaresExtendsWithNoSuchMethod&Super&Mixin {
synthetic constructor •() self::ClassDeclaresExtendsWithNoSuchMethod
;
@core::override
method noSuchMethod(core::Invocation invocation) dynamic
;
abstract method extendedMethod() core::int;
abstract method mixedInMethod() core::int;
}
class ClassDeclaresImplementsWithNoSuchMethod extends core::Object implements self::Super, self::Mixin {
synthetic constructor •() self::ClassDeclaresImplementsWithNoSuchMethod
;
@core::override
method noSuchMethod(core::Invocation invocation) dynamic
;
no-such-method-forwarder method extendedMethod() core::int
return this.{self::ClassDeclaresImplementsWithNoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#extendedMethod, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
no-such-method-forwarder method mixedInMethod() core::int
return this.{self::ClassDeclaresImplementsWithNoSuchMethod::noSuchMethod}(new core::_InvocationMirror::_withType(#mixedInMethod, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
}
static method main() dynamic
;
Extra constant evaluation status:
Evaluated: StaticGet @ org-dartlang-testcase:///inherited_implements.dart:28:4 -> InstanceConstant(const _Override{})
Evaluated: StaticGet @ org-dartlang-testcase:///inherited_implements.dart:37:4 -> InstanceConstant(const _Override{})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///inherited_implements.dart:20:7 -> SymbolConstant(#mixedInMethod)
Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:20:7 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:20:7 -> ListConstant(const <dynamic>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///inherited_implements.dart:20:7 -> MapConstant(const <Symbol*, dynamic>{})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///inherited_implements.dart:19:7 -> SymbolConstant(#extendedMethod)
Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:19:7 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:19:7 -> ListConstant(const <dynamic>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///inherited_implements.dart:19:7 -> MapConstant(const <Symbol*, dynamic>{})
Evaluated: StaticGet @ org-dartlang-testcase:///inherited_implements.dart:49:4 -> InstanceConstant(const _Override{})
Evaluated: StaticGet @ org-dartlang-testcase:///inherited_implements.dart:59:4 -> InstanceConstant(const _Override{})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///inherited_implements.dart:64:7 -> SymbolConstant(#extendedMethod)
Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:64:7 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:64:7 -> ListConstant(const <dynamic>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///inherited_implements.dart:64:7 -> MapConstant(const <Symbol*, dynamic>{})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///inherited_implements.dart:65:7 -> SymbolConstant(#mixedInMethod)
Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:65:7 -> ListConstant(const <Type*>[])
Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:65:7 -> ListConstant(const <dynamic>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///inherited_implements.dart:65:7 -> MapConstant(const <Symbol*, dynamic>{})
Extra constant evaluation: evaluated: 45, effectively constant: 20