Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1678053002: Fix super noSuchMethod handling. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 0c8e57cef78dbe63d0496fdaa7660a8dfbe73192..6bc30e8cd1b2b0a7687a4e34c7384c39fdd16693 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -4551,7 +4551,10 @@ class SsaBuilder extends ast.Visitor
String name = selector.name;
ClassElement cls = currentNonClosureClass;
- Element element = cls.lookupSuperMember(Identifiers.noSuchMethod_);
+ MethodElement element = cls.lookupSuperMember(Identifiers.noSuchMethod_);
+ if (!Selectors.noSuchMethod_.signatureApplies(element)) {
+ element = coreClasses.objectClass.lookupMember(Identifiers.noSuchMethod_);
+ }
if (compiler.enabledInvokeOn && !element.enclosingClass.isObject) {
// Register the call as dynamic if [noSuchMethod] on the super
// class is _not_ the default implementation from [Object], in
@@ -4691,6 +4694,15 @@ class SsaBuilder extends ast.Visitor
}
@override
+ void visitUnresolvedSuperSet(
+ ast.Send node,
+ Element element,
+ ast.Node rhs,
+ _) {
+ handleUnresolvedSuperInvoke(node);
+ }
+
+ @override
void visitSuperSetterGet(
ast.Send node,
MethodElement setter,

Powered by Google App Engine
This is Rietveld 408576698