mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 21:20:36 +00:00
[vm] Fix noSuchMethod forwarding stubs in mixin applications
TEST=pkg/front_end/testcases/no_such_method_forwarders/regress_* Fixes https://github.com/dart-lang/sdk/issues/53677 Fixes https://github.com/dart-lang/sdk/issues/53676 Fixes https://github.com/dart-lang/sdk/issues/53656 Fixes https://github.com/dart-lang/sdk/issues/53640 Change-Id: I282a57a6aa4d3d55235ff0fb2c1d9b8470c49c93 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329565 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
parent
1dec944c6b
commit
481f2b39fc
|
@ -0,0 +1,31 @@
|
|||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class C {
|
||||
int m();
|
||||
dynamic noSuchMethod(Invocation i) => "C";
|
||||
}
|
||||
|
||||
mixin M {
|
||||
int m();
|
||||
dynamic noSuchMethod(Invocation i) => "M";
|
||||
}
|
||||
|
||||
class MA = Object with M;
|
||||
|
||||
throws(void Function() f) {
|
||||
try {
|
||||
f();
|
||||
} on TypeError catch (e) {
|
||||
print(e);
|
||||
return;
|
||||
}
|
||||
throw 'Missing TypeError';
|
||||
}
|
||||
|
||||
main() {
|
||||
// Unhandled exception: type 'String' is not a subtype of type 'int'
|
||||
throws(() => C().m());
|
||||
throws(() => MA().m());
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
no-such-method-forwarder method m() → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "C";
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
abstract method m() → core::int;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
}
|
||||
class MA = core::Object with self::M /*hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
mixin-super-stub method noSuchMethod(core::Invocation i) → dynamic
|
||||
return super.{self::M::noSuchMethod}(i);
|
||||
no-such-method-forwarder method m() → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
}
|
||||
static method throws(() → void f) → dynamic {
|
||||
try {
|
||||
f(){() → void};
|
||||
}
|
||||
on core::TypeError catch(final core::TypeError e) {
|
||||
core::print(e);
|
||||
return;
|
||||
}
|
||||
throw "Missing TypeError";
|
||||
}
|
||||
static method main() → dynamic {
|
||||
self::throws(() → void => new self::C::•().{self::C::m}(){() → core::int});
|
||||
self::throws(() → void => new self::MA::•().{self::MA::m}(){() → core::int});
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = #m
|
||||
#C2 = <core::Type*>[]
|
||||
#C3 = <dynamic>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
no-such-method-forwarder method m() → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "C";
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
abstract method m() → core::int;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
}
|
||||
class MA extends core::Object implements self::M /*isEliminatedMixin,hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
no-such-method-forwarder method m() → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
}
|
||||
static method throws(() → void f) → dynamic {
|
||||
try {
|
||||
f(){() → void};
|
||||
}
|
||||
on core::TypeError catch(final core::TypeError e) {
|
||||
core::print(e);
|
||||
return;
|
||||
}
|
||||
throw "Missing TypeError";
|
||||
}
|
||||
static method main() → dynamic {
|
||||
self::throws(() → void => new self::C::•().{self::C::m}(){() → core::int});
|
||||
self::throws(() → void => new self::MA::•().{self::MA::m}(){() → core::int});
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = #m
|
||||
#C2 = <core::Type*>[]
|
||||
#C3 = <dynamic>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
class C {
|
||||
int m();
|
||||
dynamic noSuchMethod(Invocation i) => "C";
|
||||
}
|
||||
|
||||
mixin M {
|
||||
int m();
|
||||
dynamic noSuchMethod(Invocation i) => "M";
|
||||
}
|
||||
class MA = Object with M;
|
||||
throws(void Function() f) {}
|
||||
main() {}
|
|
@ -0,0 +1,12 @@
|
|||
class C {
|
||||
dynamic noSuchMethod(Invocation i) => "C";
|
||||
int m();
|
||||
}
|
||||
|
||||
class MA = Object with M;
|
||||
main() {}
|
||||
mixin M {
|
||||
dynamic noSuchMethod(Invocation i) => "M";
|
||||
int m();
|
||||
}
|
||||
throws(void Function() f) {}
|
|
@ -0,0 +1,48 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
no-such-method-forwarder method m() → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "C";
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
abstract method m() → core::int;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
}
|
||||
class MA = core::Object with self::M /*hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
mixin-super-stub method noSuchMethod(core::Invocation i) → dynamic
|
||||
return super.{self::M::noSuchMethod}(i);
|
||||
no-such-method-forwarder method m() → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
}
|
||||
static method throws(() → void f) → dynamic {
|
||||
try {
|
||||
f(){() → void};
|
||||
}
|
||||
on core::TypeError catch(final core::TypeError e) {
|
||||
core::print(e);
|
||||
return;
|
||||
}
|
||||
throw "Missing TypeError";
|
||||
}
|
||||
static method main() → dynamic {
|
||||
self::throws(() → void => new self::C::•().{self::C::m}(){() → core::int});
|
||||
self::throws(() → void => new self::MA::•().{self::MA::m}(){() → core::int});
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = #m
|
||||
#C2 = <core::Type*>[]
|
||||
#C3 = <dynamic>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
no-such-method-forwarder method m() → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "C";
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
abstract method m() → core::int;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
}
|
||||
class MA = core::Object with self::M /*hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
mixin-super-stub method noSuchMethod(core::Invocation i) → dynamic
|
||||
return super.{self::M::noSuchMethod}(i);
|
||||
no-such-method-forwarder method m() → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
}
|
||||
static method throws(() → void f) → dynamic {
|
||||
try {
|
||||
f(){() → void};
|
||||
}
|
||||
on core::TypeError catch(final core::TypeError e) {
|
||||
core::print(e);
|
||||
return;
|
||||
}
|
||||
throw "Missing TypeError";
|
||||
}
|
||||
static method main() → dynamic {
|
||||
self::throws(() → void => new self::C::•().{self::C::m}(){() → core::int});
|
||||
self::throws(() → void => new self::MA::•().{self::MA::m}(){() → core::int});
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = #m
|
||||
#C2 = <core::Type*>[]
|
||||
#C3 = <dynamic>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
;
|
||||
no-such-method-forwarder method m() → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#m, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
;
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
abstract method m() → core::int;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
;
|
||||
}
|
||||
class MA = core::Object with self::M /*hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
mixin-super-stub method noSuchMethod(core::Invocation i) → dynamic
|
||||
return super.{self::M::noSuchMethod}(i);
|
||||
no-such-method-forwarder method m() → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#m, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
}
|
||||
static method throws(() → void f) → dynamic
|
||||
;
|
||||
static method main() → dynamic
|
||||
;
|
||||
|
||||
|
||||
Extra constant evaluation status:
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53640.dart:6:7 -> SymbolConstant(#m)
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53640.dart:6:7 -> ListConstant(const <Type*>[])
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53640.dart:6:7 -> ListConstant(const <dynamic>[])
|
||||
Evaluated: MapLiteral @ org-dartlang-testcase:///regress_53640.dart:6:7 -> MapConstant(const <Symbol*, dynamic>{})
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53640.dart:15:7 -> SymbolConstant(#m)
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53640.dart:15:7 -> ListConstant(const <Type*>[])
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53640.dart:15:7 -> ListConstant(const <dynamic>[])
|
||||
Evaluated: MapLiteral @ org-dartlang-testcase:///regress_53640.dart:15:7 -> MapConstant(const <Symbol*, dynamic>{})
|
||||
Extra constant evaluation: evaluated: 20, effectively constant: 8
|
|
@ -0,0 +1,48 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
no-such-method-forwarder method m() → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "C";
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
abstract method m() → core::int;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
}
|
||||
class MA extends core::Object implements self::M /*isEliminatedMixin,hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
no-such-method-forwarder method m() → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
}
|
||||
static method throws(() → void f) → dynamic {
|
||||
try {
|
||||
f(){() → void};
|
||||
}
|
||||
on core::TypeError catch(final core::TypeError e) {
|
||||
core::print(e);
|
||||
return;
|
||||
}
|
||||
throw "Missing TypeError";
|
||||
}
|
||||
static method main() → dynamic {
|
||||
self::throws(() → void => new self::C::•().{self::C::m}(){() → core::int});
|
||||
self::throws(() → void => new self::MA::•().{self::MA::m}(){() → core::int});
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = #m
|
||||
#C2 = <core::Type*>[]
|
||||
#C3 = <dynamic>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
String log = "";
|
||||
|
||||
class C {
|
||||
int m1(int v, [String s = "s1"]);
|
||||
|
||||
int m2(int v, {String s = "s2"});
|
||||
|
||||
dynamic noSuchMethod(Invocation inv) {
|
||||
for (int i = 0; i < inv.positionalArguments.length; i++) {
|
||||
log += "${inv.positionalArguments[i]};";
|
||||
}
|
||||
for (int i = 0; i < inv.namedArguments.length; i++) {
|
||||
log += "s=${inv.namedArguments[Symbol("s")]};";
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
mixin M {
|
||||
int m1(int v, [String s = "s1"]);
|
||||
|
||||
int m2(int v, {String s = "s2"});
|
||||
|
||||
dynamic noSuchMethod(Invocation inv) {
|
||||
for (int i = 0; i < inv.positionalArguments.length; i++) {
|
||||
log += "${inv.positionalArguments[i]};";
|
||||
}
|
||||
for (int i = 0; i < inv.namedArguments.length; i++) {
|
||||
log += "s=${inv.namedArguments[Symbol("s")]};";
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
class MA = Object with M;
|
||||
|
||||
expect(expected, actual) {
|
||||
if (expected != actual) throw 'Expected $expected, actual $actual';
|
||||
}
|
||||
|
||||
main() {
|
||||
C().m1(1);
|
||||
expect('1;s1;', log);
|
||||
log = "";
|
||||
C().m2(2);
|
||||
expect('2;s=s2;', log);
|
||||
log = "";
|
||||
|
||||
MA().m1(1);
|
||||
expect('1;s1;', log);
|
||||
log = "";
|
||||
MA().m2(2);
|
||||
expect('2;s=s2;', log);
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
no-such-method-forwarder method m2(core::int v, {core::String s = #C5}) → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("${inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::[]}(i){(core::int) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("s=${inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::[]}(new _in::Symbol::•("s")){(core::Object?) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
abstract method m1(core::int v, [core::String s = #C1]) → core::int;
|
||||
abstract method m2(core::int v, {core::String s = #C5}) → core::int;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("${inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::[]}(i){(core::int) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("s=${inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::[]}(new _in::Symbol::•("s")){(core::Object?) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
class MA = core::Object with self::M /*hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
mixin-super-stub method noSuchMethod(core::Invocation inv) → dynamic
|
||||
return super.{self::M::noSuchMethod}(inv);
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
no-such-method-forwarder method m2(core::int v, {core::String s = #C5}) → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
}
|
||||
static field core::String log = "";
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
|
||||
throw "Expected ${expected}, actual ${actual}";
|
||||
}
|
||||
static method main() → dynamic {
|
||||
new self::C::•().{self::C::m1}(1){(core::int, [core::String]) → core::int};
|
||||
self::expect("1;s1;", self::log);
|
||||
self::log = "";
|
||||
new self::C::•().{self::C::m2}(2){(core::int, {s: core::String}) → core::int};
|
||||
self::expect("2;s=s2;", self::log);
|
||||
self::log = "";
|
||||
new self::MA::•().{self::MA::m1}(1){(core::int, [core::String]) → core::int};
|
||||
self::expect("1;s1;", self::log);
|
||||
self::log = "";
|
||||
new self::MA::•().{self::MA::m2}(2){(core::int, {s: core::String}) → core::int};
|
||||
self::expect("2;s=s2;", self::log);
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = "s1"
|
||||
#C2 = #m1
|
||||
#C3 = <core::Type*>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
#C5 = "s2"
|
||||
#C6 = #m2
|
||||
#C7 = #s
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(v, s)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
no-such-method-forwarder method m2(core::int v, {core::String s = #C5}) → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(v)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("${inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::[]}(i){(core::int) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("s=${inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::[]}(new _in::Symbol::•("s")){(core::Object?) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
abstract method m1(core::int v, [core::String s = #C1]) → core::int;
|
||||
abstract method m2(core::int v, {core::String s = #C5}) → core::int;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("${inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::[]}(i){(core::int) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("s=${inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::[]}(new _in::Symbol::•("s")){(core::Object?) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
class MA extends core::Object implements self::M /*isEliminatedMixin,hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("${inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::[]}(i){(core::int) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("s=${inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::[]}(new _in::Symbol::•("s")){(core::Object?) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(v, s)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
no-such-method-forwarder method m2(core::int v, {core::String s = #C5}) → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(v)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
}
|
||||
static field core::String log = "";
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
|
||||
throw "Expected ${expected}, actual ${actual}";
|
||||
}
|
||||
static method main() → dynamic {
|
||||
new self::C::•().{self::C::m1}(1){(core::int, [core::String]) → core::int};
|
||||
self::expect("1;s1;", self::log);
|
||||
self::log = "";
|
||||
new self::C::•().{self::C::m2}(2){(core::int, {s: core::String}) → core::int};
|
||||
self::expect("2;s=s2;", self::log);
|
||||
self::log = "";
|
||||
new self::MA::•().{self::MA::m1}(1){(core::int, [core::String]) → core::int};
|
||||
self::expect("1;s1;", self::log);
|
||||
self::log = "";
|
||||
new self::MA::•().{self::MA::m2}(2){(core::int, {s: core::String}) → core::int};
|
||||
self::expect("2;s=s2;", self::log);
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = "s1"
|
||||
#C2 = #m1
|
||||
#C3 = <core::Type*>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
#C5 = "s2"
|
||||
#C6 = #m2
|
||||
#C7 = #s
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
String log = "";
|
||||
|
||||
class C {
|
||||
int m1(int v, [String s = "s1"]);
|
||||
int m2(int v, {String s = "s2"});
|
||||
dynamic noSuchMethod(Invocation inv) {}
|
||||
}
|
||||
|
||||
mixin M {
|
||||
int m1(int v, [String s = "s1"]);
|
||||
int m2(int v, {String s = "s2"});
|
||||
dynamic noSuchMethod(Invocation inv) {}
|
||||
}
|
||||
class MA = Object with M;
|
||||
expect(expected, actual) {}
|
||||
main() {}
|
|
@ -0,0 +1,16 @@
|
|||
String log = "";
|
||||
|
||||
class C {
|
||||
dynamic noSuchMethod(Invocation inv) {}
|
||||
int m1(int v, [String s = "s1"]);
|
||||
int m2(int v, {String s = "s2"});
|
||||
}
|
||||
|
||||
class MA = Object with M;
|
||||
expect(expected, actual) {}
|
||||
main() {}
|
||||
mixin M {
|
||||
dynamic noSuchMethod(Invocation inv) {}
|
||||
int m1(int v, [String s = "s1"]);
|
||||
int m2(int v, {String s = "s2"});
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
no-such-method-forwarder method m2(core::int v, {core::String s = #C5}) → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("${inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::[]}(i){(core::int) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("s=${inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::[]}(new _in::Symbol::•("s")){(core::Object?) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
abstract method m1(core::int v, [core::String s = #C1]) → core::int;
|
||||
abstract method m2(core::int v, {core::String s = #C5}) → core::int;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("${inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::[]}(i){(core::int) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("s=${inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::[]}(new _in::Symbol::•("s")){(core::Object?) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
class MA = core::Object with self::M /*hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
mixin-super-stub method noSuchMethod(core::Invocation inv) → dynamic
|
||||
return super.{self::M::noSuchMethod}(inv);
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
no-such-method-forwarder method m2(core::int v, {core::String s = #C5}) → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
}
|
||||
static field core::String log = "";
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
|
||||
throw "Expected ${expected}, actual ${actual}";
|
||||
}
|
||||
static method main() → dynamic {
|
||||
new self::C::•().{self::C::m1}(1){(core::int, [core::String]) → core::int};
|
||||
self::expect("1;s1;", self::log);
|
||||
self::log = "";
|
||||
new self::C::•().{self::C::m2}(2){(core::int, {s: core::String}) → core::int};
|
||||
self::expect("2;s=s2;", self::log);
|
||||
self::log = "";
|
||||
new self::MA::•().{self::MA::m1}(1){(core::int, [core::String]) → core::int};
|
||||
self::expect("1;s1;", self::log);
|
||||
self::log = "";
|
||||
new self::MA::•().{self::MA::m2}(2){(core::int, {s: core::String}) → core::int};
|
||||
self::expect("2;s=s2;", self::log);
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = "s1"
|
||||
#C2 = #m1
|
||||
#C3 = <core::Type*>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
#C5 = "s2"
|
||||
#C6 = #m2
|
||||
#C7 = #s
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
no-such-method-forwarder method m2(core::int v, {core::String s = #C5}) → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("${inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::[]}(i){(core::int) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("s=${inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::[]}(new _in::Symbol::•("s")){(core::Object?) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
abstract method m1(core::int v, [core::String s = #C1]) → core::int;
|
||||
abstract method m2(core::int v, {core::String s = #C5}) → core::int;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("${inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::[]}(i){(core::int) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("s=${inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::[]}(new _in::Symbol::•("s")){(core::Object?) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
class MA = core::Object with self::M /*hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
mixin-super-stub method noSuchMethod(core::Invocation inv) → dynamic
|
||||
return super.{self::M::noSuchMethod}(inv);
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
no-such-method-forwarder method m2(core::int v, {core::String s = #C5}) → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
}
|
||||
static field core::String log = "";
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
|
||||
throw "Expected ${expected}, actual ${actual}";
|
||||
}
|
||||
static method main() → dynamic {
|
||||
new self::C::•().{self::C::m1}(1){(core::int, [core::String]) → core::int};
|
||||
self::expect("1;s1;", self::log);
|
||||
self::log = "";
|
||||
new self::C::•().{self::C::m2}(2){(core::int, {s: core::String}) → core::int};
|
||||
self::expect("2;s=s2;", self::log);
|
||||
self::log = "";
|
||||
new self::MA::•().{self::MA::m1}(1){(core::int, [core::String]) → core::int};
|
||||
self::expect("1;s1;", self::log);
|
||||
self::log = "";
|
||||
new self::MA::•().{self::MA::m2}(2){(core::int, {s: core::String}) → core::int};
|
||||
self::expect("2;s=s2;", self::log);
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = "s1"
|
||||
#C2 = #m1
|
||||
#C3 = <core::Type*>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
#C5 = "s2"
|
||||
#C6 = #m2
|
||||
#C7 = #s
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
;
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = "s1"]) → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#m1, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
no-such-method-forwarder method m2(core::int v, {core::String s = "s2"}) → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#m2, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#s: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic
|
||||
;
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
abstract method m1(core::int v, [core::String s = "s1"]) → core::int;
|
||||
abstract method m2(core::int v, {core::String s = "s2"}) → core::int;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic
|
||||
;
|
||||
}
|
||||
class MA = core::Object with self::M /*hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
mixin-super-stub method noSuchMethod(core::Invocation inv) → dynamic
|
||||
return super.{self::M::noSuchMethod}(inv);
|
||||
no-such-method-forwarder method m1(core::int v, [has-declared-initializer core::String s]) → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#m1, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
no-such-method-forwarder method m2(core::int v, {has-declared-initializer core::String s}) → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#m2, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#s: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
}
|
||||
static field core::String log;
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic
|
||||
;
|
||||
static method main() → dynamic
|
||||
;
|
||||
|
||||
|
||||
Extra constant evaluation status:
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53656.dart:8:7 -> SymbolConstant(#m1)
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53656.dart:8:7 -> ListConstant(const <Type*>[])
|
||||
Evaluated: MapLiteral @ org-dartlang-testcase:///regress_53656.dart:8:7 -> MapConstant(const <Symbol*, dynamic>{})
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53656.dart:10:7 -> SymbolConstant(#m2)
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53656.dart:10:7 -> ListConstant(const <Type*>[])
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53656.dart:10:7 -> SymbolConstant(#s)
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53656.dart:39:7 -> SymbolConstant(#m1)
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53656.dart:39:7 -> ListConstant(const <Type*>[])
|
||||
Evaluated: MapLiteral @ org-dartlang-testcase:///regress_53656.dart:39:7 -> MapConstant(const <Symbol*, dynamic>{})
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53656.dart:39:7 -> SymbolConstant(#m2)
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53656.dart:39:7 -> ListConstant(const <Type*>[])
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53656.dart:39:7 -> SymbolConstant(#s)
|
||||
Extra constant evaluation: evaluated: 52, effectively constant: 12
|
|
@ -0,0 +1,82 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(v, s)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
no-such-method-forwarder method m2(core::int v, {core::String s = #C5}) → core::int
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(v)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("${inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::[]}(i){(core::int) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("s=${inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::[]}(new _in::Symbol::•("s")){(core::Object?) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
abstract method m1(core::int v, [core::String s = #C1]) → core::int;
|
||||
abstract method m2(core::int v, {core::String s = #C5}) → core::int;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("${inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::[]}(i){(core::int) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("s=${inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::[]}(new _in::Symbol::•("s")){(core::Object?) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
class MA extends core::Object implements self::M /*isEliminatedMixin,hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("${inv.{core::Invocation::positionalArguments}{core::List<dynamic>}.{core::List::[]}(i){(core::int) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
self::log = self::log.{core::String::+}("s=${inv.{core::Invocation::namedArguments}{core::Map<core::Symbol, dynamic>}.{core::Map::[]}(new _in::Symbol::•("s")){(core::Object?) → dynamic}};"){(core::String) → core::String};
|
||||
}
|
||||
return 42;
|
||||
}
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(v, s)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
no-such-method-forwarder method m2(core::int v, {core::String s = #C5}) → core::int
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(v)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::int;
|
||||
}
|
||||
static field core::String log = "";
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
|
||||
throw "Expected ${expected}, actual ${actual}";
|
||||
}
|
||||
static method main() → dynamic {
|
||||
new self::C::•().{self::C::m1}(1){(core::int, [core::String]) → core::int};
|
||||
self::expect("1;s1;", self::log);
|
||||
self::log = "";
|
||||
new self::C::•().{self::C::m2}(2){(core::int, {s: core::String}) → core::int};
|
||||
self::expect("2;s=s2;", self::log);
|
||||
self::log = "";
|
||||
new self::MA::•().{self::MA::m1}(1){(core::int, [core::String]) → core::int};
|
||||
self::expect("1;s1;", self::log);
|
||||
self::log = "";
|
||||
new self::MA::•().{self::MA::m2}(2){(core::int, {s: core::String}) → core::int};
|
||||
self::expect("2;s=s2;", self::log);
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = "s1"
|
||||
#C2 = #m1
|
||||
#C3 = <core::Type*>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
#C5 = "s2"
|
||||
#C6 = #m2
|
||||
#C7 = #s
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class C {
|
||||
noSuchMethod(Invocation i) => "C";
|
||||
String foo();
|
||||
}
|
||||
|
||||
mixin M {
|
||||
noSuchMethod(Invocation i) => "M";
|
||||
String foo();
|
||||
}
|
||||
|
||||
class MA = Object with M;
|
||||
|
||||
void main() {
|
||||
C c = C();
|
||||
Function f1 = c.foo;
|
||||
print(f1()); // prints C
|
||||
|
||||
MA ma = MA();
|
||||
Function f2 = ma.foo;
|
||||
print(f2()); // prints M
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "C";
|
||||
no-such-method-forwarder method foo() → core::String
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
abstract method foo() → core::String;
|
||||
}
|
||||
class MA = core::Object with self::M /*hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
mixin-super-stub method noSuchMethod(core::Invocation i) → dynamic
|
||||
return super.{self::M::noSuchMethod}(i);
|
||||
no-such-method-forwarder method foo() → core::String
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
static method main() → void {
|
||||
self::C c = new self::C::•();
|
||||
core::Function f1 = c.{self::C::foo}{() → core::String};
|
||||
core::print(f1());
|
||||
self::MA ma = new self::MA::•();
|
||||
core::Function f2 = ma.{self::MA::foo}{() → core::String};
|
||||
core::print(f2());
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = #foo
|
||||
#C2 = <core::Type*>[]
|
||||
#C3 = <dynamic>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "C";
|
||||
no-such-method-forwarder method foo() → core::String
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
abstract method foo() → core::String;
|
||||
}
|
||||
class MA extends core::Object implements self::M /*isEliminatedMixin,hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
no-such-method-forwarder method foo() → core::String
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
static method main() → void {
|
||||
self::C c = new self::C::•();
|
||||
core::Function f1 = c.{self::C::foo}{() → core::String};
|
||||
core::print(f1());
|
||||
self::MA ma = new self::MA::•();
|
||||
core::Function f2 = ma.{self::MA::foo}{() → core::String};
|
||||
core::print(f2());
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = #foo
|
||||
#C2 = <core::Type*>[]
|
||||
#C3 = <dynamic>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
class C {
|
||||
noSuchMethod(Invocation i) => "C";
|
||||
String foo();
|
||||
}
|
||||
|
||||
mixin M {
|
||||
noSuchMethod(Invocation i) => "M";
|
||||
String foo();
|
||||
}
|
||||
class MA = Object with M;
|
||||
void main() {}
|
|
@ -0,0 +1,11 @@
|
|||
class C {
|
||||
String foo();
|
||||
noSuchMethod(Invocation i) => "C";
|
||||
}
|
||||
|
||||
class MA = Object with M;
|
||||
mixin M {
|
||||
String foo();
|
||||
noSuchMethod(Invocation i) => "M";
|
||||
}
|
||||
void main() {}
|
|
@ -0,0 +1,42 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "C";
|
||||
no-such-method-forwarder method foo() → core::String
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
abstract method foo() → core::String;
|
||||
}
|
||||
class MA = core::Object with self::M /*hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
mixin-super-stub method noSuchMethod(core::Invocation i) → dynamic
|
||||
return super.{self::M::noSuchMethod}(i);
|
||||
no-such-method-forwarder method foo() → core::String
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
static method main() → void {
|
||||
self::C c = new self::C::•();
|
||||
core::Function f1 = c.{self::C::foo}{() → core::String};
|
||||
core::print(f1());
|
||||
self::MA ma = new self::MA::•();
|
||||
core::Function f2 = ma.{self::MA::foo}{() → core::String};
|
||||
core::print(f2());
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = #foo
|
||||
#C2 = <core::Type*>[]
|
||||
#C3 = <dynamic>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "C";
|
||||
no-such-method-forwarder method foo() → core::String
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
abstract method foo() → core::String;
|
||||
}
|
||||
class MA = core::Object with self::M /*hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
mixin-super-stub method noSuchMethod(core::Invocation i) → dynamic
|
||||
return super.{self::M::noSuchMethod}(i);
|
||||
no-such-method-forwarder method foo() → core::String
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
static method main() → void {
|
||||
self::C c = new self::C::•();
|
||||
core::Function f1 = c.{self::C::foo}{() → core::String};
|
||||
core::print(f1());
|
||||
self::MA ma = new self::MA::•();
|
||||
core::Function f2 = ma.{self::MA::foo}{() → core::String};
|
||||
core::print(f2());
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = #foo
|
||||
#C2 = <core::Type*>[]
|
||||
#C3 = <dynamic>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
;
|
||||
no-such-method-forwarder method foo() → core::String
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
;
|
||||
abstract method foo() → core::String;
|
||||
}
|
||||
class MA = core::Object with self::M /*hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
mixin-super-stub method noSuchMethod(core::Invocation i) → dynamic
|
||||
return super.{self::M::noSuchMethod}(i);
|
||||
no-such-method-forwarder method foo() → core::String
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
static method main() → void
|
||||
;
|
||||
|
||||
|
||||
Extra constant evaluation status:
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53676.dart:7:10 -> SymbolConstant(#foo)
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53676.dart:7:10 -> ListConstant(const <Type*>[])
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53676.dart:7:10 -> ListConstant(const <dynamic>[])
|
||||
Evaluated: MapLiteral @ org-dartlang-testcase:///regress_53676.dart:7:10 -> MapConstant(const <Symbol*, dynamic>{})
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53676.dart:15:7 -> SymbolConstant(#foo)
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53676.dart:15:7 -> ListConstant(const <Type*>[])
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53676.dart:15:7 -> ListConstant(const <dynamic>[])
|
||||
Evaluated: MapLiteral @ org-dartlang-testcase:///regress_53676.dart:15:7 -> MapConstant(const <Symbol*, dynamic>{})
|
||||
Extra constant evaluation: evaluated: 20, effectively constant: 8
|
|
@ -0,0 +1,42 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "C";
|
||||
no-such-method-forwarder method foo() → core::String
|
||||
return this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
abstract class M extends core::Object /*isMixinDeclaration*/ {
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
abstract method foo() → core::String;
|
||||
}
|
||||
class MA extends core::Object implements self::M /*isEliminatedMixin,hasConstConstructor*/ {
|
||||
const synthetic constructor •() → self::MA
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation i) → dynamic
|
||||
return "M";
|
||||
no-such-method-forwarder method foo() → core::String
|
||||
return this.{self::MA::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
static method main() → void {
|
||||
self::C c = new self::C::•();
|
||||
core::Function f1 = c.{self::C::foo}{() → core::String};
|
||||
core::print(f1());
|
||||
self::MA ma = new self::MA::•();
|
||||
core::Function f2 = ma.{self::MA::foo}{() → core::String};
|
||||
core::print(f2());
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = #foo
|
||||
#C2 = <core::Type*>[]
|
||||
#C3 = <dynamic>[]
|
||||
#C4 = <core::Symbol*, dynamic>{}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
mixin class A {
|
||||
dynamic noSuchMethod(Invocation inv) {
|
||||
return "A";
|
||||
}
|
||||
}
|
||||
|
||||
mixin M on A {
|
||||
String m1(int v, [String s = "s1"]);
|
||||
|
||||
String m2(int v, {String s});
|
||||
|
||||
String m3(int v, {required String s});
|
||||
|
||||
String m4(int v, [covariant String s]);
|
||||
}
|
||||
|
||||
class MA = A with M;
|
||||
|
||||
main() {
|
||||
var m1 = MA().m1;
|
||||
print(m1(1, "1"));
|
||||
|
||||
var m2 = MA().m2;
|
||||
print(m2(1, s: "1"));
|
||||
|
||||
var m3 = MA().m3;
|
||||
print(m3(1, s: "1"));
|
||||
|
||||
var m4 = MA().m4;
|
||||
print(m4(1, "1"));
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
mixin class A extends core::Object {
|
||||
synthetic constructor •() → self::A
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
return "A";
|
||||
}
|
||||
}
|
||||
abstract class M extends self::A /*isMixinDeclaration*/ {
|
||||
abstract method m1(core::int v, [core::String s = #C1]) → core::String;
|
||||
abstract method m2(core::int v, {core::String s = #C2}) → core::String;
|
||||
abstract method m3(core::int v, {required core::String s = #C2}) → core::String;
|
||||
abstract method m4(core::int v, [covariant-by-declaration core::String s = #C2]) → core::String;
|
||||
}
|
||||
class MA = self::A with self::M {
|
||||
synthetic constructor •() → self::MA
|
||||
: super self::A::•()
|
||||
;
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method /* signature-type: (core::int, {s: core::String}) → core::String */ m2(core::int v, {core::String? s = #C2}) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method m3(core::int v, {required core::String s = #C2}) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method m4(core::int v, [covariant-by-declaration core::String s = #C2]) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
static method main() → dynamic {
|
||||
(core::int, [core::String]) → core::String m1 = new self::MA::•().{self::MA::m1}{(core::int, [core::String]) → core::String};
|
||||
core::print(m1(1, "1"){(core::int, [core::String]) → core::String});
|
||||
(core::int, {s: core::String}) → core::String m2 = new self::MA::•().{self::MA::m2}{(core::int, {s: core::String}) → core::String};
|
||||
core::print(m2(1, s: "1"){(core::int, {s: core::String}) → core::String});
|
||||
(core::int, {required s: core::String}) → core::String m3 = new self::MA::•().{self::MA::m3}{(core::int, {required s: core::String}) → core::String};
|
||||
core::print(m3(1, s: "1"){(core::int, {required s: core::String}) → core::String});
|
||||
(core::int, [core::String]) → core::String m4 = new self::MA::•().{self::MA::m4}{(core::int, [core::String]) → core::String};
|
||||
core::print(m4(1, "1"){(core::int, [core::String]) → core::String});
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = "s1"
|
||||
#C2 = null
|
||||
#C3 = #m1
|
||||
#C4 = <core::Type*>[]
|
||||
#C5 = <core::Symbol*, dynamic>{}
|
||||
#C6 = #m2
|
||||
#C7 = #s
|
||||
#C8 = #m3
|
||||
#C9 = #m4
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
mixin class A extends core::Object {
|
||||
synthetic constructor •() → self::A
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
return "A";
|
||||
}
|
||||
}
|
||||
abstract class M extends self::A /*isMixinDeclaration*/ {
|
||||
abstract method m1(core::int v, [core::String s = #C1]) → core::String;
|
||||
abstract method m2(core::int v, {core::String s = #C2}) → core::String;
|
||||
abstract method m3(core::int v, {required core::String s = #C2}) → core::String;
|
||||
abstract method m4(core::int v, [covariant-by-declaration core::String s = #C2]) → core::String;
|
||||
}
|
||||
class MA extends self::A implements self::M /*isEliminatedMixin*/ {
|
||||
synthetic constructor •() → self::MA
|
||||
: super self::A::•()
|
||||
;
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(v, s)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method /* signature-type: (core::int, {s: core::String}) → core::String */ m2(core::int v, {core::String? s = #C2}) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(v)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method m3(core::int v, {required core::String s = #C2}) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(v)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method m4(core::int v, [covariant-by-declaration core::String s = #C2]) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(v, s)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
static method main() → dynamic {
|
||||
(core::int, [core::String]) → core::String m1 = new self::MA::•().{self::MA::m1}{(core::int, [core::String]) → core::String};
|
||||
core::print(m1(1, "1"){(core::int, [core::String]) → core::String});
|
||||
(core::int, {s: core::String}) → core::String m2 = new self::MA::•().{self::MA::m2}{(core::int, {s: core::String}) → core::String};
|
||||
core::print(m2(1, s: "1"){(core::int, {s: core::String}) → core::String});
|
||||
(core::int, {required s: core::String}) → core::String m3 = new self::MA::•().{self::MA::m3}{(core::int, {required s: core::String}) → core::String};
|
||||
core::print(m3(1, s: "1"){(core::int, {required s: core::String}) → core::String});
|
||||
(core::int, [core::String]) → core::String m4 = new self::MA::•().{self::MA::m4}{(core::int, [core::String]) → core::String};
|
||||
core::print(m4(1, "1"){(core::int, [core::String]) → core::String});
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = "s1"
|
||||
#C2 = null
|
||||
#C3 = #m1
|
||||
#C4 = <core::Type*>[]
|
||||
#C5 = <core::Symbol*, dynamic>{}
|
||||
#C6 = #m2
|
||||
#C7 = #s
|
||||
#C8 = #m3
|
||||
#C9 = #m4
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
mixin class A {
|
||||
dynamic noSuchMethod(Invocation inv) {}
|
||||
}
|
||||
|
||||
mixin M on A {
|
||||
String m1(int v, [String s = "s1"]);
|
||||
String m2(int v, {String s});
|
||||
String m3(int v, {required String s});
|
||||
String m4(int v, [covariant String s]);
|
||||
}
|
||||
class MA = A with M;
|
||||
main() {}
|
|
@ -0,0 +1,12 @@
|
|||
class MA = A with M;
|
||||
main() {}
|
||||
mixin M on A {
|
||||
String m1(int v, [String s = "s1"]);
|
||||
String m2(int v, {String s});
|
||||
String m3(int v, {required String s});
|
||||
String m4(int v, [covariant String s]);
|
||||
}
|
||||
|
||||
mixin class A {
|
||||
dynamic noSuchMethod(Invocation inv) {}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
mixin class A extends core::Object {
|
||||
synthetic constructor •() → self::A
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
return "A";
|
||||
}
|
||||
}
|
||||
abstract class M extends self::A /*isMixinDeclaration*/ {
|
||||
abstract method m1(core::int v, [core::String s = #C1]) → core::String;
|
||||
abstract method m2(core::int v, {core::String s = #C2}) → core::String;
|
||||
abstract method m3(core::int v, {required core::String s = #C2}) → core::String;
|
||||
abstract method m4(core::int v, [covariant-by-declaration core::String s = #C2]) → core::String;
|
||||
}
|
||||
class MA = self::A with self::M {
|
||||
synthetic constructor •() → self::MA
|
||||
: super self::A::•()
|
||||
;
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method /* signature-type: (core::int, {s: core::String}) → core::String */ m2(core::int v, {core::String? s = #C2}) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method m3(core::int v, {required core::String s = #C2}) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method m4(core::int v, [covariant-by-declaration core::String s = #C2]) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
static method main() → dynamic {
|
||||
(core::int, [core::String]) → core::String m1 = new self::MA::•().{self::MA::m1}{(core::int, [core::String]) → core::String};
|
||||
core::print(m1(1, "1"){(core::int, [core::String]) → core::String});
|
||||
(core::int, {s: core::String}) → core::String m2 = new self::MA::•().{self::MA::m2}{(core::int, {s: core::String}) → core::String};
|
||||
core::print(m2(1, s: "1"){(core::int, {s: core::String}) → core::String});
|
||||
(core::int, {required s: core::String}) → core::String m3 = new self::MA::•().{self::MA::m3}{(core::int, {required s: core::String}) → core::String};
|
||||
core::print(m3(1, s: "1"){(core::int, {required s: core::String}) → core::String});
|
||||
(core::int, [core::String]) → core::String m4 = new self::MA::•().{self::MA::m4}{(core::int, [core::String]) → core::String};
|
||||
core::print(m4(1, "1"){(core::int, [core::String]) → core::String});
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = "s1"
|
||||
#C2 = null
|
||||
#C3 = #m1
|
||||
#C4 = <core::Type*>[]
|
||||
#C5 = <core::Symbol*, dynamic>{}
|
||||
#C6 = #m2
|
||||
#C7 = #s
|
||||
#C8 = #m3
|
||||
#C9 = #m4
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
mixin class A extends core::Object {
|
||||
synthetic constructor •() → self::A
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
return "A";
|
||||
}
|
||||
}
|
||||
abstract class M extends self::A /*isMixinDeclaration*/ {
|
||||
abstract method m1(core::int v, [core::String s = #C1]) → core::String;
|
||||
abstract method m2(core::int v, {core::String s = #C2}) → core::String;
|
||||
abstract method m3(core::int v, {required core::String s = #C2}) → core::String;
|
||||
abstract method m4(core::int v, [covariant-by-declaration core::String s = #C2]) → core::String;
|
||||
}
|
||||
class MA = self::A with self::M {
|
||||
synthetic constructor •() → self::MA
|
||||
: super self::A::•()
|
||||
;
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method /* signature-type: (core::int, {s: core::String}) → core::String */ m2(core::int v, {core::String? s = #C2}) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method m3(core::int v, {required core::String s = #C2}) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method m4(core::int v, [covariant-by-declaration core::String s = #C2]) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
static method main() → dynamic {
|
||||
(core::int, [core::String]) → core::String m1 = new self::MA::•().{self::MA::m1}{(core::int, [core::String]) → core::String};
|
||||
core::print(m1(1, "1"){(core::int, [core::String]) → core::String});
|
||||
(core::int, {s: core::String}) → core::String m2 = new self::MA::•().{self::MA::m2}{(core::int, {s: core::String}) → core::String};
|
||||
core::print(m2(1, s: "1"){(core::int, {s: core::String}) → core::String});
|
||||
(core::int, {required s: core::String}) → core::String m3 = new self::MA::•().{self::MA::m3}{(core::int, {required s: core::String}) → core::String};
|
||||
core::print(m3(1, s: "1"){(core::int, {required s: core::String}) → core::String});
|
||||
(core::int, [core::String]) → core::String m4 = new self::MA::•().{self::MA::m4}{(core::int, [core::String]) → core::String};
|
||||
core::print(m4(1, "1"){(core::int, [core::String]) → core::String});
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = "s1"
|
||||
#C2 = null
|
||||
#C3 = #m1
|
||||
#C4 = <core::Type*>[]
|
||||
#C5 = <core::Symbol*, dynamic>{}
|
||||
#C6 = #m2
|
||||
#C7 = #s
|
||||
#C8 = #m3
|
||||
#C9 = #m4
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
mixin class A extends core::Object {
|
||||
synthetic constructor •() → self::A
|
||||
;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic
|
||||
;
|
||||
}
|
||||
abstract class M extends self::A /*isMixinDeclaration*/ {
|
||||
abstract method m1(core::int v, [core::String s = "s1"]) → core::String;
|
||||
abstract method m2(core::int v, {core::String s = null}) → core::String;
|
||||
abstract method m3(core::int v, {required core::String s = null}) → core::String;
|
||||
abstract method m4(core::int v, [covariant-by-declaration core::String s = null]) → core::String;
|
||||
}
|
||||
class MA = self::A with self::M {
|
||||
synthetic constructor •() → self::MA
|
||||
: super self::A::•()
|
||||
;
|
||||
no-such-method-forwarder method m1(core::int v, [has-declared-initializer core::String s]) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#m1, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method /* signature-type: (core::int, {s: core::String}) → core::String */ m2(core::int v, {core::String? s}) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#m2, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#s: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method m3(core::int v, {required core::String s}) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#m3, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[v]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#s: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method m4(core::int v, [covariant-by-declaration core::String s]) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#m4, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[v, s]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
static method main() → dynamic
|
||||
;
|
||||
|
||||
|
||||
Extra constant evaluation status:
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53677.dart:21:7 -> SymbolConstant(#m1)
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53677.dart:21:7 -> ListConstant(const <Type*>[])
|
||||
Evaluated: MapLiteral @ org-dartlang-testcase:///regress_53677.dart:21:7 -> MapConstant(const <Symbol*, dynamic>{})
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53677.dart:21:7 -> SymbolConstant(#m2)
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53677.dart:21:7 -> ListConstant(const <Type*>[])
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53677.dart:21:7 -> SymbolConstant(#s)
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53677.dart:21:7 -> SymbolConstant(#m3)
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53677.dart:21:7 -> ListConstant(const <Type*>[])
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53677.dart:21:7 -> SymbolConstant(#s)
|
||||
Evaluated: SymbolLiteral @ org-dartlang-testcase:///regress_53677.dart:21:7 -> SymbolConstant(#m4)
|
||||
Evaluated: ListLiteral @ org-dartlang-testcase:///regress_53677.dart:21:7 -> ListConstant(const <Type*>[])
|
||||
Evaluated: MapLiteral @ org-dartlang-testcase:///regress_53677.dart:21:7 -> MapConstant(const <Symbol*, dynamic>{})
|
||||
Extra constant evaluation: evaluated: 50, effectively constant: 12
|
|
@ -0,0 +1,53 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
mixin class A extends core::Object {
|
||||
synthetic constructor •() → self::A
|
||||
: super core::Object::•()
|
||||
;
|
||||
method noSuchMethod(core::Invocation inv) → dynamic {
|
||||
return "A";
|
||||
}
|
||||
}
|
||||
abstract class M extends self::A /*isMixinDeclaration*/ {
|
||||
abstract method m1(core::int v, [core::String s = #C1]) → core::String;
|
||||
abstract method m2(core::int v, {core::String s = #C2}) → core::String;
|
||||
abstract method m3(core::int v, {required core::String s = #C2}) → core::String;
|
||||
abstract method m4(core::int v, [covariant-by-declaration core::String s = #C2]) → core::String;
|
||||
}
|
||||
class MA extends self::A implements self::M /*isEliminatedMixin*/ {
|
||||
synthetic constructor •() → self::MA
|
||||
: super self::A::•()
|
||||
;
|
||||
no-such-method-forwarder method m1(core::int v, [core::String s = #C1]) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(v, s)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method /* signature-type: (core::int, {s: core::String}) → core::String */ m2(core::int v, {core::String? s = #C2}) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(v)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method m3(core::int v, {required core::String s = #C2}) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(v)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C7: s}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
no-such-method-forwarder method m4(core::int v, [covariant-by-declaration core::String s = #C2]) → core::String
|
||||
return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(v, s)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation) → dynamic} as{TypeError,ForDynamic} core::String;
|
||||
}
|
||||
static method main() → dynamic {
|
||||
(core::int, [core::String]) → core::String m1 = new self::MA::•().{self::MA::m1}{(core::int, [core::String]) → core::String};
|
||||
core::print(m1(1, "1"){(core::int, [core::String]) → core::String});
|
||||
(core::int, {s: core::String}) → core::String m2 = new self::MA::•().{self::MA::m2}{(core::int, {s: core::String}) → core::String};
|
||||
core::print(m2(1, s: "1"){(core::int, {s: core::String}) → core::String});
|
||||
(core::int, {required s: core::String}) → core::String m3 = new self::MA::•().{self::MA::m3}{(core::int, {required s: core::String}) → core::String};
|
||||
core::print(m3(1, s: "1"){(core::int, {required s: core::String}) → core::String});
|
||||
(core::int, [core::String]) → core::String m4 = new self::MA::•().{self::MA::m4}{(core::int, [core::String]) → core::String};
|
||||
core::print(m4(1, "1"){(core::int, [core::String]) → core::String});
|
||||
}
|
||||
|
||||
constants {
|
||||
#C1 = "s1"
|
||||
#C2 = null
|
||||
#C3 = #m1
|
||||
#C4 = <core::Type*>[]
|
||||
#C5 = <core::Symbol*, dynamic>{}
|
||||
#C6 = #m2
|
||||
#C7 = #s
|
||||
#C8 = #m3
|
||||
#C9 = #m4
|
||||
}
|
|
@ -196,17 +196,20 @@ class MixinFullResolution {
|
|||
// and don't add several procedures with the same name to the class.
|
||||
continue outer;
|
||||
}
|
||||
if (procedure.isAbstract &&
|
||||
(originalProcedure.stubKind ==
|
||||
ProcedureStubKind.ConcreteForwardingStub ||
|
||||
originalProcedure.stubKind ==
|
||||
ProcedureStubKind.ConcreteMixinStub)) {
|
||||
if (procedure.isAbstract) {
|
||||
// Don't replace concrete stubs with abstract methods.
|
||||
originalProcedure.stubKind = ProcedureStubKind.Regular;
|
||||
originalProcedure.stubTarget = null;
|
||||
continue outer;
|
||||
switch (originalProcedure.stubKind) {
|
||||
case ProcedureStubKind.ConcreteForwardingStub:
|
||||
case ProcedureStubKind.ConcreteMixinStub:
|
||||
originalProcedure.stubKind = ProcedureStubKind.Regular;
|
||||
originalProcedure.stubTarget = null;
|
||||
continue outer;
|
||||
case ProcedureStubKind.NoSuchMethodForwarder:
|
||||
continue outer;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
originalIndex = i;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue