Index: dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart |
diff --git a/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart |
index 6c8bdd14cffd97bbe5adc11e92dac55f53b77da0..62d5f14c447b3fd180890def7b2becb8c9615656 100644 |
--- a/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart |
+++ b/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart |
@@ -1398,17 +1398,19 @@ class ConstructorBodyElementX extends FunctionElementX |
*/ |
class SynthesizedConstructorElementX extends FunctionElementX { |
final FunctionElement superMember; |
+ final bool isDefaultConstructor; |
SynthesizedConstructorElementX(SourceString name, |
this.superMember, |
- Element enclosing) |
+ Element enclosing, |
+ this.isDefaultConstructor) |
ngeoffray
2013/08/08 21:55:24
Did you consider a named parameter?
|
: super(name, |
ElementKind.GENERATIVE_CONSTRUCTOR, |
Modifiers.EMPTY, |
enclosing); |
SynthesizedConstructorElementX.forDefault(superMember, Element enclosing) |
- : this(const SourceString(''), superMember, enclosing); |
+ : this(const SourceString(''), superMember, enclosing, true); |
Token position() => enclosingElement.position(); |
@@ -1417,6 +1419,11 @@ class SynthesizedConstructorElementX extends FunctionElementX { |
FunctionElement get targetConstructor => superMember; |
FunctionSignature computeSignature(compiler) { |
+ if (isDefaultConstructor) { |
+ return new FunctionSignatureX( |
+ const Link<Element>(), const Link<Element>(), 0, 0, false, |
+ getEnclosingClass().thisType); |
+ } |
if (superMember.isErroneous()) { |
return compiler.objectClass.localLookup( |
const SourceString('')).computeSignature(compiler); |