Chromium Code Reviews| Index: lib/compiler/implementation/dart_backend/renamer.dart |
| diff --git a/lib/compiler/implementation/dart_backend/renamer.dart b/lib/compiler/implementation/dart_backend/renamer.dart |
| index 794f6b05e785a0c91428f807fe33d8a448f1d03b..9ee2571c25bed3294ce6c6f285e4e2a407253a57 100644 |
| --- a/lib/compiler/implementation/dart_backend/renamer.dart |
| +++ b/lib/compiler/implementation/dart_backend/renamer.dart |
| @@ -43,8 +43,19 @@ class ConflictingRenamer extends Renamer { |
| // Don't want to rename super calls. |
| && !Initializers.isSuperConstructorCall(send)) { |
| FunctionExpression constructor = element.asFunctionElement().cachedNode; |
| - return '${renameType(element.getEnclosingClass().type)}' |
| - '.${getFactoryName(constructor)}'; |
| + TypeAnnotation typeAnnotation; |
| + if (send.selector is TypeAnnotation) { |
|
Roman
2012/07/31 15:35:39
Please add comments for these ifs about what origi
Anton Muhin
2012/07/31 15:46:47
Done.
|
| + typeAnnotation = send.selector; |
| + } else if (send.selector.receiver is TypeAnnotation) { |
| + typeAnnotation = send.selector.receiver; |
| + } else { |
| + compiler.cancel( |
| + reason: "Don't know how to deduce type", |
| + element: element, |
| + node: send); |
| + } |
| + final type = new Unparser(this).unparse(typeAnnotation); |
| + return '$type.${getFactoryName(constructor)}'; |
| } else { |
| return null; |
| } |