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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/Resolver.java

Issue 9860051: Dartc erroneously reported a compile-time error on a const class with a non-final static field (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added documentation to test case Created 8 years, 9 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
« no previous file with comments | « no previous file | compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 005fba3f4cb2176e2724384840d7c4ce58a91505..07e5b1e3af8493e448fdbf2338788e66e9da5a0d 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -325,7 +325,7 @@ public class Resolver {
for (Element element : members) {
Modifiers modifiers = element.getModifiers();
if (ElementKind.of(element).equals(ElementKind.FIELD) && !modifiers.isFinal()
- && !modifiers.isAbstractField()) {
+ && !modifiers.isStatic() && !modifiers.isAbstractField()) {
FieldElement field = (FieldElement) element;
HasSourceInfo errorNode = field.getSetter() == null ? element : field.getSetter();
onError(errorNode, currentClass == originalClass
@@ -1670,7 +1670,7 @@ public class Resolver {
} else if ((superCall != null)
&& node.getModifiers().isConstant()
&& !superCall.getModifiers().isConstant()) {
- onError(node,
+ onError(node.getName(),
ResolverErrorCode.CONST_CONSTRUCTOR_MUST_CALL_CONST_SUPER);
}
}
« no previous file with comments | « no previous file | compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698