blob: a620c404a4a8cdb2478f455ae1733a9a2fc6d146 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/no_such_method_forwarders/mixin_nsm.dart:21:7: Error: The mixin application class 'Class' introduces an erroneous override of 'method1'.
// class Class = Super with Mixin implements Interface;
// ^^^^^
// pkg/front_end/testcases/no_such_method_forwarders/mixin_nsm.dart:16:20: Context: The parameter 'i' of the method 'Mixin.method1' has type 'int', which does not match the corresponding type, 'num', in the overridden method, 'Interface.method1'.
// Change to a supertype of 'num', or, for a covariant parameter, a subtype.
// void method1(int i);
// ^
// pkg/front_end/testcases/no_such_method_forwarders/mixin_nsm.dart:6:8: Context: This is the overridden method ('method1').
// void method1(num n);
// ^
//
import self as self;
import "dart:core" as core;
abstract class Interface extends core::Object {
synthetic constructor •() self::Interface
;
abstract method method1(core::num n) void;
}
class Super extends core::Object {
synthetic constructor •() self::Super
;
method method2(core::num n) void
;
method method3(core::num n) void
;
}
mixin class Mixin extends core::Object {
synthetic constructor •() self::Mixin
;
method noSuchMethod(core::Invocation _) dynamic
;
no-such-method-forwarder method method1(core::int i) void
return this.{self::Mixin::noSuchMethod}(new core::_InvocationMirror::_withType(#method1, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[i]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) dynamic};
no-such-method-forwarder method method2(covariant-by-declaration core::int i) void
return this.{self::Mixin::noSuchMethod}(new core::_InvocationMirror::_withType(#method2, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[i]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) dynamic};
no-such-method-forwarder method method3(core::num n) void
return this.{self::Mixin::noSuchMethod}(new core::_InvocationMirror::_withType(#method3, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[n]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) dynamic};
}
class Class = self::Super with self::Mixin implements self::Interface {
synthetic constructor •() self::Class
: super self::Super::•()
;
mixin-super-stub method noSuchMethod(core::Invocation _) dynamic
return super.{self::Mixin::noSuchMethod}(_);
forwarding-stub method method2(covariant-by-declaration core::int i) void
return super.{self::Super::method2}(i);
abstract mixin-stub method method3(core::num n) void; -> self::Mixin::method3
no-such-method-forwarder method method1(core::int i) void
return this.{self::Class::noSuchMethod}(new core::_InvocationMirror::_withType(#method1, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[i]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) dynamic};
}
Extra constant evaluation status:
Evaluated: SymbolLiteral @ org-dartlang-testcase:///mixin_nsm.dart:16:8 -> SymbolConstant(#method1)
Evaluated: ListLiteral @ org-dartlang-testcase:///mixin_nsm.dart:16:8 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///mixin_nsm.dart:16:8 -> MapConstant(const <Symbol*, dynamic>{})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///mixin_nsm.dart:17:8 -> SymbolConstant(#method2)
Evaluated: ListLiteral @ org-dartlang-testcase:///mixin_nsm.dart:17:8 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///mixin_nsm.dart:17:8 -> MapConstant(const <Symbol*, dynamic>{})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///mixin_nsm.dart:18:8 -> SymbolConstant(#method3)
Evaluated: ListLiteral @ org-dartlang-testcase:///mixin_nsm.dart:18:8 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///mixin_nsm.dart:18:8 -> MapConstant(const <Symbol*, dynamic>{})
Evaluated: SymbolLiteral @ org-dartlang-testcase:///mixin_nsm.dart:21:7 -> SymbolConstant(#method1)
Evaluated: ListLiteral @ org-dartlang-testcase:///mixin_nsm.dart:21:7 -> ListConstant(const <Type*>[])
Evaluated: MapLiteral @ org-dartlang-testcase:///mixin_nsm.dart:21:7 -> MapConstant(const <Symbol*, dynamic>{})
Extra constant evaluation: evaluated: 44, effectively constant: 12