Index: lib/compiler/implementation/resolver.dart |
diff --git a/lib/compiler/implementation/resolver.dart b/lib/compiler/implementation/resolver.dart |
index 132050d262edc7db89d26cdf70847d240fa79aab..e41662f7bdab33d5856740a07a0e59e62de8fbee 100644 |
--- a/lib/compiler/implementation/resolver.dart |
+++ b/lib/compiler/implementation/resolver.dart |
@@ -119,6 +119,9 @@ class ResolverTask extends CompilerTask { |
} |
FunctionExpression tree = element.parseNode(compiler); |
if (isConstructor) { |
+ if (tree.returnType != null) { |
+ error(tree, MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE); |
+ } |
resolveConstructorImplementation(element, tree); |
} |
ResolverVisitor visitor = new ResolverVisitor(compiler, element); |