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

Unified Diff: sdk/lib/_internal/compiler/implementation/closure.dart

Issue 18670003: Remove support for conflicting constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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: sdk/lib/_internal/compiler/implementation/closure.dart
diff --git a/sdk/lib/_internal/compiler/implementation/closure.dart b/sdk/lib/_internal/compiler/implementation/closure.dart
index 6abb7bd1113721252116155b45b0f4946b600be3..96909e7799f19e0a4e3ba99f0e9f6b90918d8174 100644
--- a/sdk/lib/_internal/compiler/implementation/closure.dart
+++ b/sdk/lib/_internal/compiler/implementation/closure.dart
@@ -671,9 +671,16 @@ class ClosureTranslator extends Visitor {
|| enclosingElement.kind == ElementKind.GETTER
|| enclosingElement.kind == ElementKind.SETTER);
enclosingElement = enclosingElement.enclosingElement) {
- SourceString surroundingName =
- Elements.operatorNameToIdentifier(enclosingElement.name);
- parts = parts.prepend(surroundingName.slowToString());
+ if (enclosingElement.isGenerativeConstructor() ||
+ enclosingElement.isGenerativeConstructorBody() ||
+ enclosingElement.isFactoryConstructor()) {
+ parts = parts.prepend(
+ Elements.reconstructConstructorName(enclosingElement));
ahe 2013/07/11 10:09:42 I suspect we could simplify this. The name return
Johnni Winther 2013/07/11 13:09:19 The complexity does not come from trying to comput
+ } else {
+ SourceString surroundingName =
+ Elements.operatorNameToIdentifier(enclosingElement.name);
+ parts = parts.prepend(surroundingName.slowToString());
+ }
// A generative constructors's parent is the class; the class name is
// already part of the generative constructor's name.
if (enclosingElement.kind == ElementKind.GENERATIVE_CONSTRUCTOR) break;

Powered by Google App Engine
This is Rietveld 408576698