Chromium Code Reviews| 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; |