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

Unified Diff: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java

Issue 10690074: Migrates some resolver errors to parser stage (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: # Created 8 years, 6 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: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
diff --git a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
index b2224655781fa0c00433b8d76c9636f6ad1b0111..107ab72de55a50fb2b41f6b97f104ed48b2d3fd5 100644
--- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
+++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
@@ -1699,7 +1699,8 @@ public class TypeAnalyzer implements DartCompilationPhase {
MethodElement methodElement = node.getElement();
Modifiers modifiers = methodElement.getModifiers();
DartTypeNode returnTypeNode = node.getFunction().getReturnTypeNode();
- if (modifiers.isFactory()) {
+ if (modifiers.isFactory()
+ && ElementKind.of(methodElement).equals(ElementKind.CONSTRUCTOR)) {
analyzeFactory(node.getName(), (ConstructorElement) methodElement);
} else if (modifiers.isSetter()) {
if (returnTypeNode != null && returnTypeNode.getType() != voidType) {

Powered by Google App Engine
This is Rietveld 408576698