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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 1149083007: Fix for DeclarationResolver. (Closed) Base URL: git@github.com:dart-lang/sdk.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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index a56496f6ff1c35705d35a634487c4806c6787c70..2469e75d688c7922f013d98112967fbac4c352d2 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -2064,10 +2064,6 @@ class DeclarationResolver extends RecursiveAstVisitor<Object> {
sc.Token property = node.propertyKeyword;
SimpleIdentifier methodName = node.name;
String nameOfMethod = methodName.name;
- if (nameOfMethod == sc.TokenType.MINUS.lexeme &&
- node.parameters.parameters.length == 0) {
- nameOfMethod = "unary-";
- }
if (property == null) {
_enclosingExecutable = _findWithNameAndOffset(
_enclosingClass.methods, nameOfMethod, methodName.offset);
@@ -2284,7 +2280,7 @@ class DeclarationResolver extends RecursiveAstVisitor<Object> {
Element _findWithNameAndOffset(
List<Element> elements, String name, int offset) {
for (Element element in elements) {
- if (element.displayName == name && element.nameOffset == offset) {
+ if (element.nameOffset == offset && element.displayName == name) {
return element;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698