Change how unresolved super sends are handled.

The mixin transformer is now responsible for adding no-such-method calls.

Fixes https://github.com/dart-lang/sdk/issues/30000

R=paulberry@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2963763002 .
This commit is contained in:
Peter von der Ahé
2017-06-29 12:21:48 +02:00
parent 6cb702b723
commit ba84f801f4
11 changed files with 734 additions and 180 deletions
@@ -901,35 +901,35 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
@override
Expression toSuperMethodInvocation(MethodInvocation node) {
Member target = lookupSuperMember(node.name);
bool isNoSuchMethod = target == null;
if (target is Procedure) {
if (!target.isAccessor) {
if (areArgumentsCompatible(target.function, node.arguments)) {
Expression result = new KernelDirectMethodInvocation(
new KernelThisExpression()..fileOffset = node.fileOffset,
target,
node.arguments)
..fileOffset = node.fileOffset;
// TODO(ahe): Use [DirectMethodInvocation] when possible, that is,
// remove the next line:
result =
new KernelSuperMethodInvocation(node.name, node.arguments, target)
..fileOffset = node.fileOffset;
return result;
} else {
isNoSuchMethod = true;
}
if (target == null || (target is Procedure && !target.isAccessor)) {
if (target == null) {
warnUnresolvedSuperMethod(node.name, node.fileOffset);
} else if (!areArgumentsCompatible(target.function, node.arguments)) {
target = null;
warning(
"Super class doesn't have a method named '${node.name.name}' "
"with matching arguments.",
node.fileOffset);
}
Expression result;
if (target != null) {
result = new KernelDirectMethodInvocation(
new KernelThisExpression()..fileOffset = node.fileOffset,
target,
node.arguments);
}
// TODO(ahe): Use [DirectMethodInvocation] when possible, that is,
// make the next line conditional:
result =
new KernelSuperMethodInvocation(node.name, node.arguments, target);
return result..fileOffset = node.fileOffset;
}
if (isNoSuchMethod) {
return invokeSuperNoSuchMethod(
node.name.name, node.arguments, node.fileOffset);
}
Expression receiver = new KernelDirectPropertyGet(
new KernelThisExpression()..fileOffset = node.fileOffset, target)
..fileOffset = node.fileOffset;
// TODO(ahe): Use [DirectPropertyGet] when possible, that is, remove the
// next line:
// TODO(ahe): Use [DirectPropertyGet] when possible, that is, make the next
// line conditional:
receiver = new KernelSuperPropertyGet(node.name, target)
..fileOffset = node.fileOffset;
return buildMethodInvocation(
@@ -977,51 +977,18 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
}
@override
Expression invokeSuperNoSuchMethod(
String name, Arguments arguments, int charOffset,
{bool isGetter: false, bool isSetter: false}) {
String errorName = "super.$name";
String message;
if (isGetter) {
message = "Getter not found: '$errorName'.";
name = "get:$name";
} else if (isSetter) {
message = "Setter not found: '$errorName'.";
name = "set:$name";
} else {
message = "Method not found: '$errorName'.";
}
warning(message, charOffset);
VariableDeclaration value;
if (isSetter) {
value = new VariableDeclaration.forValue(arguments.positional.single,
isFinal: true)
..fileOffset = charOffset;
arguments = new Arguments(<Expression>[
new VariableGet(value)..fileOffset = arguments.fileOffset
]);
}
Expression result = new SuperMethodInvocation(
noSuchMethodName,
new Arguments(<Expression>[
library.loader.instantiateInvocation(
new KernelThisExpression()..fileOffset = charOffset,
name,
arguments,
charOffset,
true)
])
..fileOffset = arguments.fileOffset);
if (isSetter) {
result = new Let(
value,
new Let(
new VariableDeclaration.forValue(result, isFinal: true)
..fileOffset = charOffset,
new VariableGet(value)..fileOffset = value.fileOffset))
..fileOffset = charOffset;
}
return result;
void warnUnresolvedSuperGet(Name name, int charOffset) {
warning("Super class has no getter named '${name.name}'.", charOffset);
}
@override
void warnUnresolvedSuperSet(Name name, int charOffset) {
warning("Super class has no setter named '${name.name}'.", charOffset);
}
@override
void warnUnresolvedSuperMethod(Name name, int charOffset) {
warning("Super class has no method named '${name.name}'.", charOffset);
}
@override
@@ -102,10 +102,6 @@ abstract class BuilderHelper {
Expression receiver, String name, Arguments arguments, int offset,
{bool isSuper, bool isGetter, bool isSetter, bool isStatic});
Expression invokeSuperNoSuchMethod(
String name, Arguments arguments, int charOffset,
{bool isGetter, bool isSetter});
bool checkArguments(FunctionNode function, Arguments arguments,
List<TypeParameter> typeParameters);
@@ -123,6 +119,12 @@ abstract class BuilderHelper {
TypeParameterType type, int offset, bool nonInstanceAccessIsError);
void warning(String message, [int charOffset]);
void warnUnresolvedSuperGet(Name name, int charOffset);
void warnUnresolvedSuperSet(Name name, int charOffset);
void warnUnresolvedSuperMethod(Name name, int charOffset);
}
abstract class FastaAccessor implements Accessor {
@@ -761,27 +763,13 @@ class SuperPropertyAccessor extends kernel.SuperPropertyAccessor
isConstantExpression: true,
isImplicitCall: true);
} else {
return new DirectMethodInvocation(
new KernelThisExpression(), getter, arguments)
..fileOffset = offset;
// TODO(ahe): This could be something like "super.property(...)" where
// property is a setter.
return internalError("Unhandled invocation ${getter.runtimeType}.",
helper.uri, offsetForToken(token));
}
}
Expression makeInvalidRead() {
int offset = offsetForToken(token);
return helper.invokeSuperNoSuchMethod(
plainNameForRead, new Arguments.empty()..fileOffset = offset, offset,
isGetter: true);
}
Expression makeInvalidWrite(Expression value) {
return helper.invokeSuperNoSuchMethod(
plainNameForRead,
new Arguments(<Expression>[value])..fileOffset = value.fileOffset,
offsetForToken(token),
isSetter: true);
}
toString() => "SuperPropertyAccessor()";
@override
@@ -373,7 +373,9 @@ class SuperPropertyAccessor extends Accessor {
: super(helper, token);
Expression _makeRead(KernelComplexAssignment complexAssignment) {
if (getter == null) return makeInvalidRead();
if (getter == null) {
helper.warnUnresolvedSuperGet(name, offsetForToken(token));
}
// TODO(ahe): Use [DirectPropertyGet] when possible.
var read = new KernelSuperPropertyGet(name, getter)
..fileOffset = offsetForToken(token);
@@ -383,7 +385,9 @@ class SuperPropertyAccessor extends Accessor {
Expression _makeWrite(Expression value, bool voidContext,
KernelComplexAssignment complexAssignment) {
if (setter == null) return makeInvalidWrite(value);
if (setter == null) {
helper.warnUnresolvedSuperSet(name, offsetForToken(token));
}
// TODO(ahe): Use [DirectPropertySet] when possible.
var write = new SuperPropertySet(name, value, setter)
..fileOffset = offsetForToken(token);
@@ -595,12 +599,21 @@ class SuperIndexAccessor extends Accessor {
return new VariableGet(indexVariable);
}
Expression _makeSimpleRead() => new SuperMethodInvocation(
indexGetName, new KernelArguments(<Expression>[index]), getter);
Expression _makeSimpleRead() {
if (getter == null) {
helper.warnUnresolvedSuperMethod(indexGetName, offsetForToken(token));
}
// TODO(ahe): Use [DirectMethodInvocation] when possible.
return new SuperMethodInvocation(
indexGetName, new KernelArguments(<Expression>[index]), getter);
}
Expression _makeSimpleWrite(Expression value, bool voidContext,
KernelComplexAssignment complexAssignment) {
if (!voidContext) return _makeWriteAndReturn(value, complexAssignment);
if (setter == null) {
helper.warnUnresolvedSuperMethod(indexSetName, offsetForToken(token));
}
var write = new SuperMethodInvocation(
indexSetName, new KernelArguments(<Expression>[index, value]), setter)
..fileOffset = offsetForToken(token);
@@ -609,6 +622,9 @@ class SuperIndexAccessor extends Accessor {
}
Expression _makeRead(KernelComplexAssignment complexAssignment) {
if (getter == null) {
helper.warnUnresolvedSuperMethod(indexGetName, offsetForToken(token));
}
var read = new SuperMethodInvocation(
indexGetName, new KernelArguments(<Expression>[indexAccess()]), getter)
..fileOffset = offsetForToken(token);
@@ -619,6 +635,9 @@ class SuperIndexAccessor extends Accessor {
Expression _makeWrite(Expression value, bool voidContext,
KernelComplexAssignment complexAssignment) {
if (!voidContext) return _makeWriteAndReturn(value, complexAssignment);
if (setter == null) {
helper.warnUnresolvedSuperMethod(indexSetName, offsetForToken(token));
}
var write = new SuperMethodInvocation(indexSetName,
new KernelArguments(<Expression>[indexAccess(), value]), setter)
..fileOffset = offsetForToken(token);
@@ -629,6 +648,9 @@ class SuperIndexAccessor extends Accessor {
_makeWriteAndReturn(
Expression value, KernelComplexAssignment complexAssignment) {
var valueVariable = new VariableDeclaration.forValue(value);
if (setter == null) {
helper.warnUnresolvedSuperMethod(indexSetName, offsetForToken(token));
}
var write = new SuperMethodInvocation(
indexSetName,
new KernelArguments(
@@ -7,11 +7,11 @@ class C extends core::Object {
: super core::Object::•()
;
method test() → void {
dynamic v1 = super.noSuchMethod(new core::_InvocationMirror::•("foo", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, self::f<dynamic>()].toList(growable: false), true));
dynamic v2 = super.noSuchMethod(new core::_InvocationMirror::•("get:bar", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true));
dynamic v1 = super.foo(self::f<dynamic>());
dynamic v2 = super.bar;
dynamic v3 = super.[](0);
dynamic v4 = let final dynamic #t1 = self::f<dynamic>() in let final dynamic #t2 = super.noSuchMethod(new core::_InvocationMirror::•("set:bar", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t1].toList(growable: false), true)) in #t1;
dynamic v5 = let final dynamic #t3 = 0 in let final dynamic #t4 = self::f<dynamic>() in let final dynamic #t5 = super.[]=(#t3, #t4) in #t4;
dynamic v4 = super.bar = self::f<dynamic>();
dynamic v5 = let final dynamic #t1 = 0 in let final dynamic #t2 = self::f<dynamic>() in let final dynamic #t3 = super.[]=(#t1, #t2) in #t2;
}
}
static method f<T extends core::Object>() → self::f::T
@@ -0,0 +1,33 @@
library test.mixin_library;
import self as self;
import "dart:core" as core;
class Mixin<T extends core::Object> extends core::Object {
field dynamic x = self::f();
field dynamic y = null;
field dynamic z = null;
field self::Mixin::T t = null;
constructor •() → void
: super core::Object::•()
;
method foo() → dynamic
return super.foo().+(self::f());
method g(self::Mixin::T a) → self::Mixin::T
return null;
method h() → dynamic
return self::V();
method l() → dynamic
return self::_private();
method _privateMethod() → dynamic
return 49;
method publicMethod() → dynamic
return this.{self::Mixin::_privateMethod}();
}
static method f() → dynamic
return 2;
static method V() → dynamic
return 87;
static method _private() → dynamic
return 117;
static method foo(dynamic m) → dynamic
return m._privateMethod();
@@ -0,0 +1,263 @@
library;
import self as self;
import "dart:core" as core;
class A extends core::Object {
field dynamic a = null;
field dynamic b = null;
field dynamic c = null;
field dynamic d = null;
final field dynamic f = null;
constructor •() → void
: super core::Object::•()
;
get e() → dynamic
return null;
set g(dynamic _) → void {}
get h() → dynamic
return null;
set h(dynamic _) → void {}
get i() → dynamic
return null;
operator [](dynamic _) → dynamic
return null;
operator []=(dynamic a, dynamic b) → dynamic {}
operator ~() → dynamic
return 117;
operator unary-() → dynamic
return 117;
operator ==(dynamic other) → core::bool
return true;
method m() → void {}
method n() → void {}
set n(dynamic _) → void {}
}
class B extends self::A {
final field dynamic d = null;
constructor •() → void
: super self::A::•()
;
get b() → dynamic
return null;
set c(dynamic x) → void {}
set i(dynamic x) → void {}
}
class C extends self::B {
constructor •() → void
: super self::B::•()
;
method test() → dynamic {
super.{self::A::~}();
self::use(super.{self::A::~}());
super.{self::A::unary-}();
self::use(super.{self::A::unary-}());
const core::_ConstantExpressionError::•()._throw(new core::_CompileTimeError::•("pkg/front_end/testcases/rasta/super.dart:43:6: Error: Can't use `super` as an expression.\n +super;\n ^"));
self::use(const core::_ConstantExpressionError::•()._throw(new core::_CompileTimeError::•("pkg/front_end/testcases/rasta/super.dart:44:10: Error: Can't use `super` as an expression.\n use(+super);\n ^")));
super.{self::A::==}(87);
self::use(super.{self::A::==}(87));
!super.{self::A::==}(87);
self::use(!super.{self::A::==}(87));
super.{self::A::a};
self::use(super.{self::A::a});
super.{self::B::b};
self::use(super.{self::B::b});
super.{self::A::c};
self::use(super.{self::A::c});
super.{self::B::d};
self::use(super.{self::B::d});
super.{self::A::e};
self::use(super.{self::A::e});
super.{self::A::f};
self::use(super.{self::A::f});
super.g;
self::use(super.g);
super.{self::A::h};
self::use(super.{self::A::h});
super.{self::A::i};
self::use(super.{self::A::i});
super.{self::A::[]}(87);
self::use(super.{self::A::[]}(87));
super.{self::A::m};
self::use(super.{self::A::m});
super.{self::A::n};
self::use(super.{self::A::n});
super.{self::A::a} = super.{self::A::a}.+(1);
self::use(let final dynamic #t1 = super.{self::A::a} in let final dynamic #t2 = super.{self::A::a} = #t1.+(1) in #t1);
super.{self::A::b} = super.{self::B::b}.+(1);
self::use(let final dynamic #t3 = super.{self::B::b} in let final dynamic #t4 = super.{self::A::b} = #t3.+(1) in #t3);
super.{self::B::c} = super.{self::A::c}.+(1);
self::use(let final dynamic #t5 = super.{self::A::c} in let final dynamic #t6 = super.{self::B::c} = #t5.+(1) in #t5);
super.{self::A::d} = super.{self::B::d}.+(1);
self::use(let final dynamic #t7 = super.{self::B::d} in let final dynamic #t8 = super.{self::A::d} = #t7.+(1) in #t7);
super.e = super.{self::A::e}.+(1);
self::use(let final dynamic #t9 = super.{self::A::e} in let final dynamic #t10 = super.e = #t9.+(1) in #t9);
super.f = super.{self::A::f}.+(1);
self::use(let final dynamic #t11 = super.{self::A::f} in let final dynamic #t12 = super.f = #t11.+(1) in #t11);
super.{self::A::g} = super.g.+(1);
self::use(let final dynamic #t13 = super.g in let final dynamic #t14 = super.{self::A::g} = #t13.+(1) in #t13);
super.{self::A::h} = super.{self::A::h}.+(1);
self::use(let final dynamic #t15 = super.{self::A::h} in let final dynamic #t16 = super.{self::A::h} = #t15.+(1) in #t15);
super.{self::B::i} = super.{self::A::i}.+(1);
self::use(let final dynamic #t17 = super.{self::A::i} in let final dynamic #t18 = super.{self::B::i} = #t17.+(1) in #t17);
let final dynamic #t19 = 87 in super.{self::A::[]=}(#t19, super.{self::A::[]}(#t19).+(1));
self::use(let final dynamic #t20 = 87 in let final dynamic #t21 = super.{self::A::[]}(#t20) in let final dynamic #t22 = super.{self::A::[]=}(#t20, #t21.+(1)) in #t21);
super.m = super.{self::A::m}.+(1);
self::use(let final dynamic #t23 = super.{self::A::m} in let final dynamic #t24 = super.m = #t23.+(1) in #t23);
super.{self::A::n} = super.{self::A::n}.+(1);
self::use(let final dynamic #t25 = super.{self::A::n} in let final dynamic #t26 = super.{self::A::n} = #t25.+(1) in #t25);
super.{self::A::a} = super.{self::A::a}.+(1);
self::use(super.{self::A::a} = super.{self::A::a}.+(1));
super.{self::A::b} = super.{self::B::b}.+(1);
self::use(super.{self::A::b} = super.{self::B::b}.+(1));
super.{self::B::c} = super.{self::A::c}.+(1);
self::use(super.{self::B::c} = super.{self::A::c}.+(1));
super.{self::A::d} = super.{self::B::d}.+(1);
self::use(super.{self::A::d} = super.{self::B::d}.+(1));
super.e = super.{self::A::e}.+(1);
self::use(super.e = super.{self::A::e}.+(1));
super.f = super.{self::A::f}.+(1);
self::use(super.f = super.{self::A::f}.+(1));
super.{self::A::g} = super.g.+(1);
self::use(super.{self::A::g} = super.g.+(1));
super.{self::A::h} = super.{self::A::h}.+(1);
self::use(super.{self::A::h} = super.{self::A::h}.+(1));
super.{self::B::i} = super.{self::A::i}.+(1);
self::use(super.{self::B::i} = super.{self::A::i}.+(1));
let final dynamic #t27 = 87 in let final dynamic #t28 = super.{self::A::[]}(#t27).+(1) in let final dynamic #t29 = super.{self::A::[]=}(#t27, #t28) in #t28;
self::use(let final dynamic #t30 = 87 in let final dynamic #t31 = super.{self::A::[]}(#t30).+(1) in let final dynamic #t32 = super.{self::A::[]=}(#t30, #t31) in #t31);
super.m = super.{self::A::m}.+(1);
self::use(super.m = super.{self::A::m}.+(1));
super.{self::A::n} = super.{self::A::n}.+(1);
self::use(super.{self::A::n} = super.{self::A::n}.+(1));
super.{self::A::a}.call();
self::use(super.{self::A::a}.call());
super.{self::B::b}.call();
self::use(super.{self::B::b}.call());
super.{self::A::c}.call();
self::use(super.{self::A::c}.call());
super.{self::B::d}.call();
self::use(super.{self::B::d}.call());
super.{self::A::e}.call();
self::use(super.{self::A::e}.call());
super.{self::A::f}.call();
self::use(super.{self::A::f}.call());
super.g();
self::use(super.g());
super.{self::A::h}.call();
self::use(super.{self::A::h}.call());
super.{self::A::i}.call();
self::use(super.{self::A::i}.call());
super.{self::A::[]}(87).call();
self::use(super.{self::A::[]}(87).call());
super.{self::A::m}();
self::use(super.{self::A::m}());
super.{self::A::m}(87);
self::use(super.{self::A::m}(87));
super.{self::A::n}(87);
self::use(super.{self::A::n}(87));
super.{self::A::a} = 42;
self::use(super.{self::A::a} = 42);
super.{self::A::b} = 42;
self::use(super.{self::A::b} = 42);
super.{self::B::c} = 42;
self::use(super.{self::B::c} = 42);
super.{self::A::d} = 42;
self::use(super.{self::A::d} = 42);
super.e = 42;
self::use(super.e = 42);
super.f = 42;
self::use(super.f = 42);
super.{self::A::g} = 42;
self::use(super.{self::A::g} = 42);
super.{self::A::h} = 42;
self::use(super.{self::A::h} = 42);
super.{self::B::i} = 42;
self::use(super.{self::B::i} = 42);
super.{self::A::[]=}(87, 42);
self::use(let final dynamic #t33 = 87 in let final dynamic #t34 = 42 in let final dynamic #t35 = super.{self::A::[]=}(#t33, #t34) in #t34);
super.m = 42;
self::use(super.m = 42);
super.{self::A::n} = 42;
self::use(super.{self::A::n} = 42);
super.{self::A::a}.==(null) ? super.{self::A::a} = 42 : null;
self::use(let final dynamic #t36 = super.{self::A::a} in #t36.==(null) ? super.{self::A::a} = 42 : #t36);
super.{self::B::b}.==(null) ? super.{self::A::b} = 42 : null;
self::use(let final dynamic #t37 = super.{self::B::b} in #t37.==(null) ? super.{self::A::b} = 42 : #t37);
super.{self::A::c}.==(null) ? super.{self::B::c} = 42 : null;
self::use(let final dynamic #t38 = super.{self::A::c} in #t38.==(null) ? super.{self::B::c} = 42 : #t38);
super.{self::B::d}.==(null) ? super.{self::A::d} = 42 : null;
self::use(let final dynamic #t39 = super.{self::B::d} in #t39.==(null) ? super.{self::A::d} = 42 : #t39);
super.{self::A::e}.==(null) ? super.e = 42 : null;
self::use(let final dynamic #t40 = super.{self::A::e} in #t40.==(null) ? super.e = 42 : #t40);
super.{self::A::f}.==(null) ? super.f = 42 : null;
self::use(let final dynamic #t41 = super.{self::A::f} in #t41.==(null) ? super.f = 42 : #t41);
super.g.==(null) ? super.{self::A::g} = 42 : null;
self::use(let final dynamic #t42 = super.g in #t42.==(null) ? super.{self::A::g} = 42 : #t42);
super.{self::A::h}.==(null) ? super.{self::A::h} = 42 : null;
self::use(let final dynamic #t43 = super.{self::A::h} in #t43.==(null) ? super.{self::A::h} = 42 : #t43);
super.{self::A::i}.==(null) ? super.{self::B::i} = 42 : null;
self::use(let final dynamic #t44 = super.{self::A::i} in #t44.==(null) ? super.{self::B::i} = 42 : #t44);
let final dynamic #t45 = 87 in super.{self::A::[]}(#t45).==(null) ? let final dynamic #t46 = 42 in let final dynamic #t47 = super.{self::A::[]=}(#t45, #t46) in #t46 : null;
self::use(let final dynamic #t48 = 87 in let final dynamic #t49 = super.{self::A::[]}(#t48) in #t49.==(null) ? let final dynamic #t50 = 42 in let final dynamic #t51 = super.{self::A::[]=}(#t48, #t50) in #t50 : #t49);
super.{self::A::m}.==(null) ? super.m = 42 : null;
self::use(let final dynamic #t52 = super.{self::A::m} in #t52.==(null) ? super.m = 42 : #t52);
super.{self::A::n}.==(null) ? super.{self::A::n} = 42 : null;
self::use(let final dynamic #t53 = super.{self::A::n} in #t53.==(null) ? super.{self::A::n} = 42 : #t53);
super.{self::A::a} = super.{self::A::a}.+(42);
self::use(super.{self::A::a} = super.{self::A::a}.+(42));
super.{self::A::b} = super.{self::B::b}.+(42);
self::use(super.{self::A::b} = super.{self::B::b}.+(42));
super.{self::B::c} = super.{self::A::c}.+(42);
self::use(super.{self::B::c} = super.{self::A::c}.+(42));
super.{self::A::d} = super.{self::B::d}.+(42);
self::use(super.{self::A::d} = super.{self::B::d}.+(42));
super.e = super.{self::A::e}.+(42);
self::use(super.e = super.{self::A::e}.+(42));
super.f = super.{self::A::f}.+(42);
self::use(super.f = super.{self::A::f}.+(42));
super.{self::A::g} = super.g.+(42);
self::use(super.{self::A::g} = super.g.+(42));
super.{self::A::h} = super.{self::A::h}.+(42);
self::use(super.{self::A::h} = super.{self::A::h}.+(42));
super.{self::B::i} = super.{self::A::i}.+(42);
self::use(super.{self::B::i} = super.{self::A::i}.+(42));
let final dynamic #t54 = 87 in super.{self::A::[]=}(#t54, super.{self::A::[]}(#t54).+(42));
self::use(let final dynamic #t55 = 87 in let final dynamic #t56 = super.{self::A::[]}(#t55).+(42) in let final dynamic #t57 = super.{self::A::[]=}(#t55, #t56) in #t56);
super.m = super.{self::A::m}.+(42);
self::use(super.m = super.{self::A::m}.+(42));
super.{self::A::n} = super.{self::A::n}.+(42);
self::use(super.{self::A::n} = super.{self::A::n}.+(42));
super.{self::A::a} = super.{self::A::a}.-(42);
self::use(super.{self::A::a} = super.{self::A::a}.-(42));
super.{self::A::b} = super.{self::B::b}.-(42);
self::use(super.{self::A::b} = super.{self::B::b}.-(42));
super.{self::B::c} = super.{self::A::c}.-(42);
self::use(super.{self::B::c} = super.{self::A::c}.-(42));
super.{self::A::d} = super.{self::B::d}.-(42);
self::use(super.{self::A::d} = super.{self::B::d}.-(42));
super.e = super.{self::A::e}.-(42);
self::use(super.e = super.{self::A::e}.-(42));
super.f = super.{self::A::f}.-(42);
self::use(super.f = super.{self::A::f}.-(42));
super.{self::A::g} = super.g.-(42);
self::use(super.{self::A::g} = super.g.-(42));
super.{self::A::h} = super.{self::A::h}.-(42);
self::use(super.{self::A::h} = super.{self::A::h}.-(42));
super.{self::B::i} = super.{self::A::i}.-(42);
self::use(super.{self::B::i} = super.{self::A::i}.-(42));
let final dynamic #t58 = 87 in super.{self::A::[]=}(#t58, super.{self::A::[]}(#t58).-(42));
self::use(let final dynamic #t59 = 87 in let final dynamic #t60 = super.{self::A::[]}(#t59).-(42) in let final dynamic #t61 = super.{self::A::[]=}(#t59, #t60) in #t60);
super.m = super.{self::A::m}.-(42);
self::use(super.m = super.{self::A::m}.-(42));
super.{self::A::n} = super.{self::A::n}.-(42);
self::use(super.{self::A::n} = super.{self::A::n}.-(42));
}
}
const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/rasta/super.dart:43:5: Error: '+' is not a prefix operator. \n +super;\n ^", "pkg/front_end/testcases/rasta/super.dart:44:9: Error: '+' is not a prefix operator. \n use(+super);\n ^"]/* from null */;
static method use(dynamic x) → dynamic {
if(x.==(new core::DateTime::now().{core::DateTime::millisecondsSinceEpoch}))
throw "Shouldn't happen";
}
static method main() → dynamic {
new self::C::•().{self::C::test}();
}
@@ -0,0 +1,42 @@
library;
import self as self;
import "dart:core" as core;
import "./mixin_library.dart" as mix;
class Super<S extends core::Object> extends core::Object {
constructor •() → void
: super core::Object::•()
;
method foo() → dynamic
return 40;
method f() → dynamic
return 3;
}
abstract class Super&Mixin^#T0^#T0<#T0 extends core::Object> = self::Super<self::Super&Mixin^#T0^#T0::#T0> with mix::Mixin<self::Super&Mixin^#T0^#T0::#T0> {
}
class C<V extends core::Object> extends self::Super&Mixin^#T0^#T0<self::C::V> {
constructor •() → void
: super self::Super::•()
;
}
abstract class Super&Mixin = self::Super<dynamic> with mix::Mixin<dynamic> {
}
class D extends self::Super&Mixin {
constructor •() → void
: super self::Super::•()
;
}
class C2<V extends core::Object> = self::Super<self::C2::V> with mix::Mixin<self::C2::V> {
constructor •() → void
: super self::Super::•()
;
}
class D2 = self::Super<dynamic> with mix::Mixin<dynamic> {
constructor •() → void
: super self::Super::•()
;
}
static method main() → dynamic {
core::print(new self::C::•<dynamic>().{mix::Mixin::foo}());
core::print(new self::C2::•<dynamic>().{mix::Mixin::foo}());
}
+2 -4
View File
@@ -44,7 +44,6 @@ redirecting_constructor: Fail
redirecting_factory: Fail
statements: Fail
stringliteral: Fail
super_rasta_copy: Fail
top_level_accessors: Fail
type_variable_as_super: Fail
typedef: Fail
@@ -135,14 +134,13 @@ rasta/malformed_const_constructor: Fail
rasta/malformed_function: Fail
rasta/malformed_function_type: Fail
rasta/mandatory_parameter_initializer: Fail
rasta/mixin_library: Fail
rasta/mixin_library: RuntimeError
rasta/native_is_illegal: Fail
rasta/parser_error: Fail
rasta/previsit_deferred: Fail
rasta/static: Fail
rasta/super: Fail
rasta/super: RuntimeError
rasta/super_initializer: Fail
rasta/super_mixin: Fail
rasta/super_operator: Fail
rasta/supports_reflection: VerificationError
rasta/switch_execution_case_t02: Fail
@@ -65,8 +65,8 @@ class C extends self::B {
self::use(super.{self::A::e});
super.{self::A::f};
self::use(super.{self::A::f});
super.noSuchMethod(new core::_InvocationMirror::•("get:g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true));
self::use(super.noSuchMethod(new core::_InvocationMirror::•("get:g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true)));
super.g;
self::use(super.g);
super.{self::A::h};
self::use(super.{self::A::h});
super.{self::A::i};
@@ -83,20 +83,20 @@ class C extends self::B {
self::use(let final dynamic #t5 = super.{self::A::c} in let final dynamic #t6 = super.{self::B::c} = #t5.+(1) in #t5);
super.{self::A::d} = super.{self::B::d}.+(1);
self::use(let final dynamic #t7 = super.{self::B::d} in let final dynamic #t8 = super.{self::A::d} = #t7.+(1) in #t7);
let final dynamic #t9 = super.{self::A::e}.+(1) in let final dynamic #t10 = super.noSuchMethod(new core::_InvocationMirror::•("set:e", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t9].toList(growable: false), true)) in #t9;
self::use(let final dynamic #t11 = super.{self::A::e} in let final dynamic #t12 = let final dynamic #t13 = #t11.+(1) in let final dynamic #t14 = super.noSuchMethod(new core::_InvocationMirror::•("set:e", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t13].toList(growable: false), true)) in #t13 in #t11);
let final dynamic #t15 = super.{self::A::f}.+(1) in let final dynamic #t16 = super.noSuchMethod(new core::_InvocationMirror::•("set:f", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t15].toList(growable: false), true)) in #t15;
self::use(let final dynamic #t17 = super.{self::A::f} in let final dynamic #t18 = let final dynamic #t19 = #t17.+(1) in let final dynamic #t20 = super.noSuchMethod(new core::_InvocationMirror::•("set:f", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t19].toList(growable: false), true)) in #t19 in #t17);
super.{self::A::g} = super.noSuchMethod(new core::_InvocationMirror::•("get:g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true)).+(1);
self::use(let final dynamic #t21 = super.noSuchMethod(new core::_InvocationMirror::•("get:g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true)) in let final dynamic #t22 = super.{self::A::g} = #t21.+(1) in #t21);
super.e = super.{self::A::e}.+(1);
self::use(let final dynamic #t9 = super.{self::A::e} in let final dynamic #t10 = super.e = #t9.+(1) in #t9);
super.f = super.{self::A::f}.+(1);
self::use(let final dynamic #t11 = super.{self::A::f} in let final dynamic #t12 = super.f = #t11.+(1) in #t11);
super.{self::A::g} = super.g.+(1);
self::use(let final dynamic #t13 = super.g in let final dynamic #t14 = super.{self::A::g} = #t13.+(1) in #t13);
super.{self::A::h} = super.{self::A::h}.+(1);
self::use(let final dynamic #t23 = super.{self::A::h} in let final dynamic #t24 = super.{self::A::h} = #t23.+(1) in #t23);
self::use(let final dynamic #t15 = super.{self::A::h} in let final dynamic #t16 = super.{self::A::h} = #t15.+(1) in #t15);
super.{self::B::i} = super.{self::A::i}.+(1);
self::use(let final dynamic #t25 = super.{self::A::i} in let final dynamic #t26 = super.{self::B::i} = #t25.+(1) in #t25);
let final dynamic #t27 = 87 in super.{self::A::[]=}(#t27, super.{self::A::[]}(#t27).+(1));
self::use(let final dynamic #t28 = 87 in let final dynamic #t29 = super.{self::A::[]}(#t28) in let final dynamic #t30 = super.{self::A::[]=}(#t28, #t29.+(1)) in #t29);
let final dynamic #t31 = super.{self::A::m}.+(1) in let final dynamic #t32 = super.noSuchMethod(new core::_InvocationMirror::•("set:m", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t31].toList(growable: false), true)) in #t31;
self::use(let final dynamic #t33 = super.{self::A::m} in let final dynamic #t34 = let final dynamic #t35 = #t33.+(1) in let final dynamic #t36 = super.noSuchMethod(new core::_InvocationMirror::•("set:m", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t35].toList(growable: false), true)) in #t35 in #t33);
self::use(let final dynamic #t17 = super.{self::A::i} in let final dynamic #t18 = super.{self::B::i} = #t17.+(1) in #t17);
let final dynamic #t19 = 87 in super.{self::A::[]=}(#t19, super.{self::A::[]}(#t19).+(1));
self::use(let final dynamic #t20 = 87 in let final dynamic #t21 = super.{self::A::[]}(#t20) in let final dynamic #t22 = super.{self::A::[]=}(#t20, #t21.+(1)) in #t21);
super.m = super.{self::A::m}.+(1);
self::use(let final dynamic #t23 = super.{self::A::m} in let final dynamic #t24 = super.m = #t23.+(1) in #t23);
super.{self::A::a} = super.{self::A::a}.+(1);
self::use(super.{self::A::a} = super.{self::A::a}.+(1));
super.{self::A::b} = super.{self::B::b}.+(1);
@@ -105,20 +105,20 @@ class C extends self::B {
self::use(super.{self::B::c} = super.{self::A::c}.+(1));
super.{self::A::d} = super.{self::B::d}.+(1);
self::use(super.{self::A::d} = super.{self::B::d}.+(1));
let final dynamic #t37 = super.{self::A::e}.+(1) in let final dynamic #t38 = super.noSuchMethod(new core::_InvocationMirror::•("set:e", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t37].toList(growable: false), true)) in #t37;
self::use(let final dynamic #t39 = super.{self::A::e}.+(1) in let final dynamic #t40 = super.noSuchMethod(new core::_InvocationMirror::•("set:e", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t39].toList(growable: false), true)) in #t39);
let final dynamic #t41 = super.{self::A::f}.+(1) in let final dynamic #t42 = super.noSuchMethod(new core::_InvocationMirror::•("set:f", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t41].toList(growable: false), true)) in #t41;
self::use(let final dynamic #t43 = super.{self::A::f}.+(1) in let final dynamic #t44 = super.noSuchMethod(new core::_InvocationMirror::•("set:f", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t43].toList(growable: false), true)) in #t43);
super.{self::A::g} = super.noSuchMethod(new core::_InvocationMirror::•("get:g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true)).+(1);
self::use(super.{self::A::g} = super.noSuchMethod(new core::_InvocationMirror::•("get:g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true)).+(1));
super.e = super.{self::A::e}.+(1);
self::use(super.e = super.{self::A::e}.+(1));
super.f = super.{self::A::f}.+(1);
self::use(super.f = super.{self::A::f}.+(1));
super.{self::A::g} = super.g.+(1);
self::use(super.{self::A::g} = super.g.+(1));
super.{self::A::h} = super.{self::A::h}.+(1);
self::use(super.{self::A::h} = super.{self::A::h}.+(1));
super.{self::B::i} = super.{self::A::i}.+(1);
self::use(super.{self::B::i} = super.{self::A::i}.+(1));
let final dynamic #t45 = 87 in let final dynamic #t46 = super.{self::A::[]}(#t45).+(1) in let final dynamic #t47 = super.{self::A::[]=}(#t45, #t46) in #t46;
self::use(let final dynamic #t48 = 87 in let final dynamic #t49 = super.{self::A::[]}(#t48).+(1) in let final dynamic #t50 = super.{self::A::[]=}(#t48, #t49) in #t49);
let final dynamic #t51 = super.{self::A::m}.+(1) in let final dynamic #t52 = super.noSuchMethod(new core::_InvocationMirror::•("set:m", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t51].toList(growable: false), true)) in #t51;
self::use(let final dynamic #t53 = super.{self::A::m}.+(1) in let final dynamic #t54 = super.noSuchMethod(new core::_InvocationMirror::•("set:m", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t53].toList(growable: false), true)) in #t53);
let final dynamic #t25 = 87 in let final dynamic #t26 = super.{self::A::[]}(#t25).+(1) in let final dynamic #t27 = super.{self::A::[]=}(#t25, #t26) in #t26;
self::use(let final dynamic #t28 = 87 in let final dynamic #t29 = super.{self::A::[]}(#t28).+(1) in let final dynamic #t30 = super.{self::A::[]=}(#t28, #t29) in #t29);
super.m = super.{self::A::m}.+(1);
self::use(super.m = super.{self::A::m}.+(1));
super.{self::A::a}.call();
self::use(super.{self::A::a}.call());
super.{self::B::b}.call();
@@ -131,8 +131,8 @@ class C extends self::B {
self::use(super.{self::A::e}.call());
super.{self::A::f}.call();
self::use(super.{self::A::f}.call());
super.noSuchMethod(new core::_InvocationMirror::•("g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true));
self::use(super.noSuchMethod(new core::_InvocationMirror::•("g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true)));
super.g();
self::use(super.g());
super.{self::A::h}.call();
self::use(super.{self::A::h}.call());
super.{self::A::i}.call();
@@ -151,10 +151,10 @@ class C extends self::B {
self::use(super.{self::B::c} = 42);
super.{self::A::d} = 42;
self::use(super.{self::A::d} = 42);
let final dynamic #t55 = 42 in let final dynamic #t56 = super.noSuchMethod(new core::_InvocationMirror::•("set:e", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t55].toList(growable: false), true)) in #t55;
self::use(let final dynamic #t57 = 42 in let final dynamic #t58 = super.noSuchMethod(new core::_InvocationMirror::•("set:e", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t57].toList(growable: false), true)) in #t57);
let final dynamic #t59 = 42 in let final dynamic #t60 = super.noSuchMethod(new core::_InvocationMirror::•("set:f", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t59].toList(growable: false), true)) in #t59;
self::use(let final dynamic #t61 = 42 in let final dynamic #t62 = super.noSuchMethod(new core::_InvocationMirror::•("set:f", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t61].toList(growable: false), true)) in #t61);
super.e = 42;
self::use(super.e = 42);
super.f = 42;
self::use(super.f = 42);
super.{self::A::g} = 42;
self::use(super.{self::A::g} = 42);
super.{self::A::h} = 42;
@@ -162,31 +162,31 @@ class C extends self::B {
super.{self::B::i} = 42;
self::use(super.{self::B::i} = 42);
super.{self::A::[]=}(87, 42);
self::use(let final dynamic #t63 = 87 in let final dynamic #t64 = 42 in let final dynamic #t65 = super.{self::A::[]=}(#t63, #t64) in #t64);
let final dynamic #t66 = 42 in let final dynamic #t67 = super.noSuchMethod(new core::_InvocationMirror::•("set:m", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t66].toList(growable: false), true)) in #t66;
self::use(let final dynamic #t68 = 42 in let final dynamic #t69 = super.noSuchMethod(new core::_InvocationMirror::•("set:m", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t68].toList(growable: false), true)) in #t68);
self::use(let final dynamic #t31 = 87 in let final dynamic #t32 = 42 in let final dynamic #t33 = super.{self::A::[]=}(#t31, #t32) in #t32);
super.m = 42;
self::use(super.m = 42);
super.{self::A::a}.==(null) ? super.{self::A::a} = 42 : null;
self::use(let final dynamic #t70 = super.{self::A::a} in #t70.==(null) ? super.{self::A::a} = 42 : #t70);
self::use(let final dynamic #t34 = super.{self::A::a} in #t34.==(null) ? super.{self::A::a} = 42 : #t34);
super.{self::B::b}.==(null) ? super.{self::A::b} = 42 : null;
self::use(let final dynamic #t71 = super.{self::B::b} in #t71.==(null) ? super.{self::A::b} = 42 : #t71);
self::use(let final dynamic #t35 = super.{self::B::b} in #t35.==(null) ? super.{self::A::b} = 42 : #t35);
super.{self::A::c}.==(null) ? super.{self::B::c} = 42 : null;
self::use(let final dynamic #t72 = super.{self::A::c} in #t72.==(null) ? super.{self::B::c} = 42 : #t72);
self::use(let final dynamic #t36 = super.{self::A::c} in #t36.==(null) ? super.{self::B::c} = 42 : #t36);
super.{self::B::d}.==(null) ? super.{self::A::d} = 42 : null;
self::use(let final dynamic #t73 = super.{self::B::d} in #t73.==(null) ? super.{self::A::d} = 42 : #t73);
super.{self::A::e}.==(null) ? let final dynamic #t74 = 42 in let final dynamic #t75 = super.noSuchMethod(new core::_InvocationMirror::•("set:e", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t74].toList(growable: false), true)) in #t74 : null;
self::use(let final dynamic #t76 = super.{self::A::e} in #t76.==(null) ? let final dynamic #t77 = 42 in let final dynamic #t78 = super.noSuchMethod(new core::_InvocationMirror::•("set:e", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t77].toList(growable: false), true)) in #t77 : #t76);
super.{self::A::f}.==(null) ? let final dynamic #t79 = 42 in let final dynamic #t80 = super.noSuchMethod(new core::_InvocationMirror::•("set:f", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t79].toList(growable: false), true)) in #t79 : null;
self::use(let final dynamic #t81 = super.{self::A::f} in #t81.==(null) ? let final dynamic #t82 = 42 in let final dynamic #t83 = super.noSuchMethod(new core::_InvocationMirror::•("set:f", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t82].toList(growable: false), true)) in #t82 : #t81);
super.noSuchMethod(new core::_InvocationMirror::•("get:g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true)).==(null) ? super.{self::A::g} = 42 : null;
self::use(let final dynamic #t84 = super.noSuchMethod(new core::_InvocationMirror::•("get:g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true)) in #t84.==(null) ? super.{self::A::g} = 42 : #t84);
self::use(let final dynamic #t37 = super.{self::B::d} in #t37.==(null) ? super.{self::A::d} = 42 : #t37);
super.{self::A::e}.==(null) ? super.e = 42 : null;
self::use(let final dynamic #t38 = super.{self::A::e} in #t38.==(null) ? super.e = 42 : #t38);
super.{self::A::f}.==(null) ? super.f = 42 : null;
self::use(let final dynamic #t39 = super.{self::A::f} in #t39.==(null) ? super.f = 42 : #t39);
super.g.==(null) ? super.{self::A::g} = 42 : null;
self::use(let final dynamic #t40 = super.g in #t40.==(null) ? super.{self::A::g} = 42 : #t40);
super.{self::A::h}.==(null) ? super.{self::A::h} = 42 : null;
self::use(let final dynamic #t85 = super.{self::A::h} in #t85.==(null) ? super.{self::A::h} = 42 : #t85);
self::use(let final dynamic #t41 = super.{self::A::h} in #t41.==(null) ? super.{self::A::h} = 42 : #t41);
super.{self::A::i}.==(null) ? super.{self::B::i} = 42 : null;
self::use(let final dynamic #t86 = super.{self::A::i} in #t86.==(null) ? super.{self::B::i} = 42 : #t86);
let final dynamic #t87 = 87 in super.{self::A::[]}(#t87).==(null) ? let final dynamic #t88 = 42 in let final dynamic #t89 = super.{self::A::[]=}(#t87, #t88) in #t88 : null;
self::use(let final dynamic #t90 = 87 in let final dynamic #t91 = super.{self::A::[]}(#t90) in #t91.==(null) ? let final dynamic #t92 = 42 in let final dynamic #t93 = super.{self::A::[]=}(#t90, #t92) in #t92 : #t91);
super.{self::A::m}.==(null) ? let final dynamic #t94 = 42 in let final dynamic #t95 = super.noSuchMethod(new core::_InvocationMirror::•("set:m", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t94].toList(growable: false), true)) in #t94 : null;
self::use(let final dynamic #t96 = super.{self::A::m} in #t96.==(null) ? let final dynamic #t97 = 42 in let final dynamic #t98 = super.noSuchMethod(new core::_InvocationMirror::•("set:m", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t97].toList(growable: false), true)) in #t97 : #t96);
self::use(let final dynamic #t42 = super.{self::A::i} in #t42.==(null) ? super.{self::B::i} = 42 : #t42);
let final dynamic #t43 = 87 in super.{self::A::[]}(#t43).==(null) ? let final dynamic #t44 = 42 in let final dynamic #t45 = super.{self::A::[]=}(#t43, #t44) in #t44 : null;
self::use(let final dynamic #t46 = 87 in let final dynamic #t47 = super.{self::A::[]}(#t46) in #t47.==(null) ? let final dynamic #t48 = 42 in let final dynamic #t49 = super.{self::A::[]=}(#t46, #t48) in #t48 : #t47);
super.{self::A::m}.==(null) ? super.m = 42 : null;
self::use(let final dynamic #t50 = super.{self::A::m} in #t50.==(null) ? super.m = 42 : #t50);
super.{self::A::a} = super.{self::A::a}.+(42);
self::use(super.{self::A::a} = super.{self::A::a}.+(42));
super.{self::A::b} = super.{self::B::b}.+(42);
@@ -195,20 +195,20 @@ class C extends self::B {
self::use(super.{self::B::c} = super.{self::A::c}.+(42));
super.{self::A::d} = super.{self::B::d}.+(42);
self::use(super.{self::A::d} = super.{self::B::d}.+(42));
let final dynamic #t99 = super.{self::A::e}.+(42) in let final dynamic #t100 = super.noSuchMethod(new core::_InvocationMirror::•("set:e", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t99].toList(growable: false), true)) in #t99;
self::use(let final dynamic #t101 = super.{self::A::e}.+(42) in let final dynamic #t102 = super.noSuchMethod(new core::_InvocationMirror::•("set:e", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t101].toList(growable: false), true)) in #t101);
let final dynamic #t103 = super.{self::A::f}.+(42) in let final dynamic #t104 = super.noSuchMethod(new core::_InvocationMirror::•("set:f", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t103].toList(growable: false), true)) in #t103;
self::use(let final dynamic #t105 = super.{self::A::f}.+(42) in let final dynamic #t106 = super.noSuchMethod(new core::_InvocationMirror::•("set:f", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t105].toList(growable: false), true)) in #t105);
super.{self::A::g} = super.noSuchMethod(new core::_InvocationMirror::•("get:g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true)).+(42);
self::use(super.{self::A::g} = super.noSuchMethod(new core::_InvocationMirror::•("get:g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true)).+(42));
super.e = super.{self::A::e}.+(42);
self::use(super.e = super.{self::A::e}.+(42));
super.f = super.{self::A::f}.+(42);
self::use(super.f = super.{self::A::f}.+(42));
super.{self::A::g} = super.g.+(42);
self::use(super.{self::A::g} = super.g.+(42));
super.{self::A::h} = super.{self::A::h}.+(42);
self::use(super.{self::A::h} = super.{self::A::h}.+(42));
super.{self::B::i} = super.{self::A::i}.+(42);
self::use(super.{self::B::i} = super.{self::A::i}.+(42));
let final dynamic #t107 = 87 in super.{self::A::[]=}(#t107, super.{self::A::[]}(#t107).+(42));
self::use(let final dynamic #t108 = 87 in let final dynamic #t109 = super.{self::A::[]}(#t108).+(42) in let final dynamic #t110 = super.{self::A::[]=}(#t108, #t109) in #t109);
let final dynamic #t111 = super.{self::A::m}.+(42) in let final dynamic #t112 = super.noSuchMethod(new core::_InvocationMirror::•("set:m", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t111].toList(growable: false), true)) in #t111;
self::use(let final dynamic #t113 = super.{self::A::m}.+(42) in let final dynamic #t114 = super.noSuchMethod(new core::_InvocationMirror::•("set:m", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t113].toList(growable: false), true)) in #t113);
let final dynamic #t51 = 87 in super.{self::A::[]=}(#t51, super.{self::A::[]}(#t51).+(42));
self::use(let final dynamic #t52 = 87 in let final dynamic #t53 = super.{self::A::[]}(#t52).+(42) in let final dynamic #t54 = super.{self::A::[]=}(#t52, #t53) in #t53);
super.m = super.{self::A::m}.+(42);
self::use(super.m = super.{self::A::m}.+(42));
super.{self::A::a} = super.{self::A::a}.-(42);
self::use(super.{self::A::a} = super.{self::A::a}.-(42));
super.{self::A::b} = super.{self::B::b}.-(42);
@@ -217,20 +217,20 @@ class C extends self::B {
self::use(super.{self::B::c} = super.{self::A::c}.-(42));
super.{self::A::d} = super.{self::B::d}.-(42);
self::use(super.{self::A::d} = super.{self::B::d}.-(42));
let final dynamic #t115 = super.{self::A::e}.-(42) in let final dynamic #t116 = super.noSuchMethod(new core::_InvocationMirror::•("set:e", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t115].toList(growable: false), true)) in #t115;
self::use(let final dynamic #t117 = super.{self::A::e}.-(42) in let final dynamic #t118 = super.noSuchMethod(new core::_InvocationMirror::•("set:e", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t117].toList(growable: false), true)) in #t117);
let final dynamic #t119 = super.{self::A::f}.-(42) in let final dynamic #t120 = super.noSuchMethod(new core::_InvocationMirror::•("set:f", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t119].toList(growable: false), true)) in #t119;
self::use(let final dynamic #t121 = super.{self::A::f}.-(42) in let final dynamic #t122 = super.noSuchMethod(new core::_InvocationMirror::•("set:f", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t121].toList(growable: false), true)) in #t121);
super.{self::A::g} = super.noSuchMethod(new core::_InvocationMirror::•("get:g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true)).-(42);
self::use(super.{self::A::g} = super.noSuchMethod(new core::_InvocationMirror::•("get:g", <dynamic>[0, 1, 1].toList(growable: false), <dynamic>[this].toList(growable: false), true)).-(42));
super.e = super.{self::A::e}.-(42);
self::use(super.e = super.{self::A::e}.-(42));
super.f = super.{self::A::f}.-(42);
self::use(super.f = super.{self::A::f}.-(42));
super.{self::A::g} = super.g.-(42);
self::use(super.{self::A::g} = super.g.-(42));
super.{self::A::h} = super.{self::A::h}.-(42);
self::use(super.{self::A::h} = super.{self::A::h}.-(42));
super.{self::B::i} = super.{self::A::i}.-(42);
self::use(super.{self::B::i} = super.{self::A::i}.-(42));
let final dynamic #t123 = 87 in super.{self::A::[]=}(#t123, super.{self::A::[]}(#t123).-(42));
self::use(let final dynamic #t124 = 87 in let final dynamic #t125 = super.{self::A::[]}(#t124).-(42) in let final dynamic #t126 = super.{self::A::[]=}(#t124, #t125) in #t125);
let final dynamic #t127 = super.{self::A::m}.-(42) in let final dynamic #t128 = super.noSuchMethod(new core::_InvocationMirror::•("set:m", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t127].toList(growable: false), true)) in #t127;
self::use(let final dynamic #t129 = super.{self::A::m}.-(42) in let final dynamic #t130 = super.noSuchMethod(new core::_InvocationMirror::•("set:m", <dynamic>[0, 2, 2].toList(growable: false), <dynamic>[this, #t129].toList(growable: false), true)) in #t129);
let final dynamic #t55 = 87 in super.{self::A::[]=}(#t55, super.{self::A::[]}(#t55).-(42));
self::use(let final dynamic #t56 = 87 in let final dynamic #t57 = super.{self::A::[]}(#t56).-(42) in let final dynamic #t58 = super.{self::A::[]=}(#t56, #t57) in #t57);
super.m = super.{self::A::m}.-(42);
self::use(super.m = super.{self::A::m}.-(42));
}
}
static method use(dynamic x) → dynamic {
@@ -0,0 +1,248 @@
library;
import self as self;
import "dart:core" as core;
class A extends core::Object {
field dynamic a = null;
field dynamic b = null;
field dynamic c = null;
field dynamic d = null;
final field dynamic f = null;
constructor •() → void
: super core::Object::•()
;
get e() → dynamic
return null;
set g(dynamic _) → void {}
get h() → dynamic
return null;
set h(dynamic _) → void {}
get i() → dynamic
return null;
operator [](dynamic _) → dynamic
return null;
operator []=(dynamic a, dynamic b) → dynamic {}
operator ~() → dynamic
return 117;
operator unary-() → dynamic
return 117;
operator ==(dynamic other) → core::bool
return true;
method m() → void {}
}
class B extends self::A {
final field dynamic d = null;
constructor •() → void
: super self::A::•()
;
get b() → dynamic
return null;
set c(dynamic x) → void {}
set i(dynamic x) → void {}
}
class C extends self::B {
constructor •() → void
: super self::B::•()
;
method test() → dynamic {
super.{self::A::~}();
self::use(super.{self::A::~}());
super.{self::A::unary-}();
self::use(super.{self::A::unary-}());
super.{self::A::==}(87);
self::use(super.{self::A::==}(87));
!super.{self::A::==}(87);
self::use(!super.{self::A::==}(87));
super.{self::A::a};
self::use(super.{self::A::a});
super.{self::B::b};
self::use(super.{self::B::b});
super.{self::A::c};
self::use(super.{self::A::c});
super.{self::B::d};
self::use(super.{self::B::d});
super.{self::A::e};
self::use(super.{self::A::e});
super.{self::A::f};
self::use(super.{self::A::f});
super.g;
self::use(super.g);
super.{self::A::h};
self::use(super.{self::A::h});
super.{self::A::i};
self::use(super.{self::A::i});
super.{self::A::[]}(87);
self::use(super.{self::A::[]}(87));
super.{self::A::m};
self::use(super.{self::A::m});
super.{self::A::a} = super.{self::A::a}.+(1);
self::use(let final dynamic #t1 = super.{self::A::a} in let final dynamic #t2 = super.{self::A::a} = #t1.+(1) in #t1);
super.{self::A::b} = super.{self::B::b}.+(1);
self::use(let final dynamic #t3 = super.{self::B::b} in let final dynamic #t4 = super.{self::A::b} = #t3.+(1) in #t3);
super.{self::B::c} = super.{self::A::c}.+(1);
self::use(let final dynamic #t5 = super.{self::A::c} in let final dynamic #t6 = super.{self::B::c} = #t5.+(1) in #t5);
super.{self::A::d} = super.{self::B::d}.+(1);
self::use(let final dynamic #t7 = super.{self::B::d} in let final dynamic #t8 = super.{self::A::d} = #t7.+(1) in #t7);
super.e = super.{self::A::e}.+(1);
self::use(let final dynamic #t9 = super.{self::A::e} in let final dynamic #t10 = super.e = #t9.+(1) in #t9);
super.f = super.{self::A::f}.+(1);
self::use(let final dynamic #t11 = super.{self::A::f} in let final dynamic #t12 = super.f = #t11.+(1) in #t11);
super.{self::A::g} = super.g.+(1);
self::use(let final dynamic #t13 = super.g in let final dynamic #t14 = super.{self::A::g} = #t13.+(1) in #t13);
super.{self::A::h} = super.{self::A::h}.+(1);
self::use(let final dynamic #t15 = super.{self::A::h} in let final dynamic #t16 = super.{self::A::h} = #t15.+(1) in #t15);
super.{self::B::i} = super.{self::A::i}.+(1);
self::use(let final dynamic #t17 = super.{self::A::i} in let final dynamic #t18 = super.{self::B::i} = #t17.+(1) in #t17);
let final dynamic #t19 = 87 in super.{self::A::[]=}(#t19, super.{self::A::[]}(#t19).+(1));
self::use(let final dynamic #t20 = 87 in let final dynamic #t21 = super.{self::A::[]}(#t20) in let final dynamic #t22 = super.{self::A::[]=}(#t20, #t21.+(1)) in #t21);
super.m = super.{self::A::m}.+(1);
self::use(let final dynamic #t23 = super.{self::A::m} in let final dynamic #t24 = super.m = #t23.+(1) in #t23);
super.{self::A::a} = super.{self::A::a}.+(1);
self::use(super.{self::A::a} = super.{self::A::a}.+(1));
super.{self::A::b} = super.{self::B::b}.+(1);
self::use(super.{self::A::b} = super.{self::B::b}.+(1));
super.{self::B::c} = super.{self::A::c}.+(1);
self::use(super.{self::B::c} = super.{self::A::c}.+(1));
super.{self::A::d} = super.{self::B::d}.+(1);
self::use(super.{self::A::d} = super.{self::B::d}.+(1));
super.e = super.{self::A::e}.+(1);
self::use(super.e = super.{self::A::e}.+(1));
super.f = super.{self::A::f}.+(1);
self::use(super.f = super.{self::A::f}.+(1));
super.{self::A::g} = super.g.+(1);
self::use(super.{self::A::g} = super.g.+(1));
super.{self::A::h} = super.{self::A::h}.+(1);
self::use(super.{self::A::h} = super.{self::A::h}.+(1));
super.{self::B::i} = super.{self::A::i}.+(1);
self::use(super.{self::B::i} = super.{self::A::i}.+(1));
let final dynamic #t25 = 87 in let final dynamic #t26 = super.{self::A::[]}(#t25).+(1) in let final dynamic #t27 = super.{self::A::[]=}(#t25, #t26) in #t26;
self::use(let final dynamic #t28 = 87 in let final dynamic #t29 = super.{self::A::[]}(#t28).+(1) in let final dynamic #t30 = super.{self::A::[]=}(#t28, #t29) in #t29);
super.m = super.{self::A::m}.+(1);
self::use(super.m = super.{self::A::m}.+(1));
super.{self::A::a}.call();
self::use(super.{self::A::a}.call());
super.{self::B::b}.call();
self::use(super.{self::B::b}.call());
super.{self::A::c}.call();
self::use(super.{self::A::c}.call());
super.{self::B::d}.call();
self::use(super.{self::B::d}.call());
super.{self::A::e}.call();
self::use(super.{self::A::e}.call());
super.{self::A::f}.call();
self::use(super.{self::A::f}.call());
super.g();
self::use(super.g());
super.{self::A::h}.call();
self::use(super.{self::A::h}.call());
super.{self::A::i}.call();
self::use(super.{self::A::i}.call());
super.{self::A::[]}(87).call();
self::use(super.{self::A::[]}(87).call());
super.{self::A::m}();
self::use(super.{self::A::m}());
super.{self::A::m}(87);
self::use(super.{self::A::m}(87));
super.{self::A::a} = 42;
self::use(super.{self::A::a} = 42);
super.{self::A::b} = 42;
self::use(super.{self::A::b} = 42);
super.{self::B::c} = 42;
self::use(super.{self::B::c} = 42);
super.{self::A::d} = 42;
self::use(super.{self::A::d} = 42);
super.e = 42;
self::use(super.e = 42);
super.f = 42;
self::use(super.f = 42);
super.{self::A::g} = 42;
self::use(super.{self::A::g} = 42);
super.{self::A::h} = 42;
self::use(super.{self::A::h} = 42);
super.{self::B::i} = 42;
self::use(super.{self::B::i} = 42);
super.{self::A::[]=}(87, 42);
self::use(let final dynamic #t31 = 87 in let final dynamic #t32 = 42 in let final dynamic #t33 = super.{self::A::[]=}(#t31, #t32) in #t32);
super.m = 42;
self::use(super.m = 42);
super.{self::A::a}.==(null) ? super.{self::A::a} = 42 : null;
self::use(let final dynamic #t34 = super.{self::A::a} in #t34.==(null) ? super.{self::A::a} = 42 : #t34);
super.{self::B::b}.==(null) ? super.{self::A::b} = 42 : null;
self::use(let final dynamic #t35 = super.{self::B::b} in #t35.==(null) ? super.{self::A::b} = 42 : #t35);
super.{self::A::c}.==(null) ? super.{self::B::c} = 42 : null;
self::use(let final dynamic #t36 = super.{self::A::c} in #t36.==(null) ? super.{self::B::c} = 42 : #t36);
super.{self::B::d}.==(null) ? super.{self::A::d} = 42 : null;
self::use(let final dynamic #t37 = super.{self::B::d} in #t37.==(null) ? super.{self::A::d} = 42 : #t37);
super.{self::A::e}.==(null) ? super.e = 42 : null;
self::use(let final dynamic #t38 = super.{self::A::e} in #t38.==(null) ? super.e = 42 : #t38);
super.{self::A::f}.==(null) ? super.f = 42 : null;
self::use(let final dynamic #t39 = super.{self::A::f} in #t39.==(null) ? super.f = 42 : #t39);
super.g.==(null) ? super.{self::A::g} = 42 : null;
self::use(let final dynamic #t40 = super.g in #t40.==(null) ? super.{self::A::g} = 42 : #t40);
super.{self::A::h}.==(null) ? super.{self::A::h} = 42 : null;
self::use(let final dynamic #t41 = super.{self::A::h} in #t41.==(null) ? super.{self::A::h} = 42 : #t41);
super.{self::A::i}.==(null) ? super.{self::B::i} = 42 : null;
self::use(let final dynamic #t42 = super.{self::A::i} in #t42.==(null) ? super.{self::B::i} = 42 : #t42);
let final dynamic #t43 = 87 in super.{self::A::[]}(#t43).==(null) ? let final dynamic #t44 = 42 in let final dynamic #t45 = super.{self::A::[]=}(#t43, #t44) in #t44 : null;
self::use(let final dynamic #t46 = 87 in let final dynamic #t47 = super.{self::A::[]}(#t46) in #t47.==(null) ? let final dynamic #t48 = 42 in let final dynamic #t49 = super.{self::A::[]=}(#t46, #t48) in #t48 : #t47);
super.{self::A::m}.==(null) ? super.m = 42 : null;
self::use(let final dynamic #t50 = super.{self::A::m} in #t50.==(null) ? super.m = 42 : #t50);
super.{self::A::a} = super.{self::A::a}.+(42);
self::use(super.{self::A::a} = super.{self::A::a}.+(42));
super.{self::A::b} = super.{self::B::b}.+(42);
self::use(super.{self::A::b} = super.{self::B::b}.+(42));
super.{self::B::c} = super.{self::A::c}.+(42);
self::use(super.{self::B::c} = super.{self::A::c}.+(42));
super.{self::A::d} = super.{self::B::d}.+(42);
self::use(super.{self::A::d} = super.{self::B::d}.+(42));
super.e = super.{self::A::e}.+(42);
self::use(super.e = super.{self::A::e}.+(42));
super.f = super.{self::A::f}.+(42);
self::use(super.f = super.{self::A::f}.+(42));
super.{self::A::g} = super.g.+(42);
self::use(super.{self::A::g} = super.g.+(42));
super.{self::A::h} = super.{self::A::h}.+(42);
self::use(super.{self::A::h} = super.{self::A::h}.+(42));
super.{self::B::i} = super.{self::A::i}.+(42);
self::use(super.{self::B::i} = super.{self::A::i}.+(42));
let final dynamic #t51 = 87 in super.{self::A::[]=}(#t51, super.{self::A::[]}(#t51).+(42));
self::use(let final dynamic #t52 = 87 in let final dynamic #t53 = super.{self::A::[]}(#t52).+(42) in let final dynamic #t54 = super.{self::A::[]=}(#t52, #t53) in #t53);
super.m = super.{self::A::m}.+(42);
self::use(super.m = super.{self::A::m}.+(42));
super.{self::A::a} = super.{self::A::a}.-(42);
self::use(super.{self::A::a} = super.{self::A::a}.-(42));
super.{self::A::b} = super.{self::B::b}.-(42);
self::use(super.{self::A::b} = super.{self::B::b}.-(42));
super.{self::B::c} = super.{self::A::c}.-(42);
self::use(super.{self::B::c} = super.{self::A::c}.-(42));
super.{self::A::d} = super.{self::B::d}.-(42);
self::use(super.{self::A::d} = super.{self::B::d}.-(42));
super.e = super.{self::A::e}.-(42);
self::use(super.e = super.{self::A::e}.-(42));
super.f = super.{self::A::f}.-(42);
self::use(super.f = super.{self::A::f}.-(42));
super.{self::A::g} = super.g.-(42);
self::use(super.{self::A::g} = super.g.-(42));
super.{self::A::h} = super.{self::A::h}.-(42);
self::use(super.{self::A::h} = super.{self::A::h}.-(42));
super.{self::B::i} = super.{self::A::i}.-(42);
self::use(super.{self::B::i} = super.{self::A::i}.-(42));
let final dynamic #t55 = 87 in super.{self::A::[]=}(#t55, super.{self::A::[]}(#t55).-(42));
self::use(let final dynamic #t56 = 87 in let final dynamic #t57 = super.{self::A::[]}(#t56).-(42) in let final dynamic #t58 = super.{self::A::[]=}(#t56, #t57) in #t57);
super.m = super.{self::A::m}.-(42);
self::use(super.m = super.{self::A::m}.-(42));
}
}
static method use(dynamic x) → dynamic {
if(x.==(new core::DateTime::now().{core::DateTime::millisecondsSinceEpoch}))
throw "Shouldn't happen";
}
static method main() → dynamic {
try {
new self::C::•().{self::C::test}();
}
on core::NoSuchMethodError catch(no-exception-var) {
return;
}
throw "Test failed";
}
+1 -8
View File
@@ -4,13 +4,6 @@
unsorted/invocation_errors_test: RuntimeError
[ $compiler == dartk || $compiler == dartkp ]
unsorted/super_mixin_test: RuntimeError
[ $compiler == dartk && $runtime == vm ]
[ $compiler == dartkp && $runtime == dart_precompiled ]
[ $compiler == dart2analyzer && $runtime == none ]
unsorted/invocation_errors_test: StaticWarning
unsorted/super_mixin_test: CompileTimeError
@@ -23,4 +16,4 @@ unsorted/invocation_errors_test: Pass
unsorted/nsm_dispatcher_test: Skip # The test uses Symbol without MirrorsUsed
unsorted/super_initializer_test: Skip
unsorted/super_mixin_test: CompileTimeError
unsorted/loop_test: Skip
unsorted/loop_test: Skip