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

Unified Diff: lib/src/codegen/js_codegen.dart

Issue 1144303003: Use signature inheritance when method types are unchanged (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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: lib/src/codegen/js_codegen.dart
diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
index 1808bf3a1e50ad3dd4710dcfaa2d84b77efaee76..466b73058f84309c4e9f7af6d9b63546b860f7b8 100644
--- a/lib/src/codegen/js_codegen.dart
+++ b/lib/src/codegen/js_codegen.dart
@@ -592,6 +592,10 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
if (!(node.isSetter || node.isGetter || node.isAbstract)) {
var name = node.name.name;
var element = node.element;
+ var inheritedElement =
+ classElem.lookUpInheritedConcreteMethod(name, currentLibrary);
+ if (inheritedElement != null &&
+ inheritedElement.type == element.type) continue;
var unary = node.parameters.parameters.isEmpty;
var memberName = _emitMemberName(name,
type: cType, unary: unary, isStatic: node.isStatic);

Powered by Google App Engine
This is Rietveld 408576698