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

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: Updated cf. comments. 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/dart_backend/renamer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2fd29dacc6e7b5c837c8061ecd7f3bde81ce885c 100644
--- a/sdk/lib/_internal/compiler/implementation/closure.dart
+++ b/sdk/lib/_internal/compiler/implementation/closure.dart
@@ -671,9 +671,17 @@ 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());
+ // TODO(johnniwinther): Simplify computed names.
+ if (enclosingElement.isGenerativeConstructor() ||
+ enclosingElement.isGenerativeConstructorBody() ||
+ enclosingElement.isFactoryConstructor()) {
+ parts = parts.prepend(
+ Elements.reconstructConstructorName(enclosingElement));
+ } 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;
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/dart_backend/renamer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698