Index: pkg/dev_compiler/tool/patch_sdk.dart |
diff --git a/pkg/dev_compiler/tool/patch_sdk.dart b/pkg/dev_compiler/tool/patch_sdk.dart |
index 2b716403460ead755dff742122650cf14edd8810..9796cfb7490ae779716fd5a089981ab5a612caf8 100755 |
--- a/pkg/dev_compiler/tool/patch_sdk.dart |
+++ b/pkg/dev_compiler/tool/patch_sdk.dart |
@@ -349,13 +349,23 @@ class PatchFinder extends GeneralizingAstVisitor { |
} |
String _qualifiedName(Declaration node) { |
+ var result = ""; |
+ |
var parent = node.parent; |
- var className = ''; |
if (parent is ClassDeclaration) { |
- className = parent.name.name + '.'; |
+ result = "${parent.name.name}."; |
} |
+ |
var name = (node as dynamic).name; |
- return className + (name != null ? name.name : ''); |
+ if (name != null) result += name.name; |
+ |
+ // Make sure setters and getters don't collide. |
+ if ((node is FunctionDeclaration || node is MethodDeclaration) && |
+ (node as dynamic).isSetter) { |
+ result += "="; |
+ } |
+ |
+ return result; |
} |
bool _isPatch(AnnotatedNode node) => node.metadata.any(_isPatchAnnotation); |