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

Unified Diff: lib/compiler/implementation/resolver.dart

Issue 10854216: Fix for class members cannot have the same name as the class in dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
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);

Powered by Google App Engine
This is Rietveld 408576698