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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/ConstructorElementImplementation.java

Issue 10666020: Issue 2478. Support for 'factory lib.Interface.namedConstructor()' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | compiler/java/com/google/dart/compiler/resolver/MemberBuilder.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/resolver/ConstructorElementImplementation.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/ConstructorElementImplementation.java b/compiler/java/com/google/dart/compiler/resolver/ConstructorElementImplementation.java
index 8db610a8160c4986845bd288df09e9be9ffaf44b..2fcce1aecc7652168256a60a26fe761e49fd0608 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ConstructorElementImplementation.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ConstructorElementImplementation.java
@@ -32,7 +32,12 @@ class ConstructorElementImplementation extends MethodElementImplementation
return getRawName(((DartParameterizedTypeNode) name).getExpression());
} else {
DartPropertyAccess propertyAccess = (DartPropertyAccess) name;
- return getRawName(propertyAccess.getQualifier()) + "." + getRawName(propertyAccess.getName());
+ DartNode qualifier = propertyAccess.getQualifier();
+ if (ElementKind.of(qualifier.getElement()) == ElementKind.CLASS) {
+ return getRawName(qualifier) + "." + getRawName(propertyAccess.getName());
+ } else {
+ return getRawName(propertyAccess.getName());
+ }
}
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/MemberBuilder.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698