Index: compiler/java/com/google/dart/compiler/resolver/Resolver.java |
diff --git a/compiler/java/com/google/dart/compiler/resolver/Resolver.java b/compiler/java/com/google/dart/compiler/resolver/Resolver.java |
index 4721b98aed25209a03404dbcf4996217f548951d..17ed6ccae8f5c430e7aedd83910cd73a4d853997 100644 |
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java |
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java |
@@ -935,6 +935,12 @@ public class Resolver { |
constructor = checkIsConstructor(x, element); |
} |
+ if (constructor != null) { |
+ if (x.isConst() && !constructor.getModifiers().isConstant()) { |
+ onError(x, ResolverErrorCode.CONST_AND_NONCONST_CONSTRUCTOR); |
+ } |
+ } |
+ |
return recordElement(x, constructor); |
} |