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

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

Issue 10695067: Added a few tests, removed some error codes from Resolver (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/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 8950795b96e5a161532bd597f170a641bf42b9c0..2bb673710e6b83cddd7956d4a1746463e549add7 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -1698,10 +1698,6 @@ public class Resolver {
onError(node, ResolverErrorCode.DID_YOU_MEAN_NEW, name, "type variable");
break;
- case LABEL:
- onError(node, ResolverErrorCode.CANNOT_CALL_LABEL);
- break;
-
case FUNCTION_TYPE_ALIAS:
onError(node, ResolverErrorCode.CANNOT_CALL_FUNCTION_TYPE_ALIAS);
break;
@@ -2056,9 +2052,7 @@ public class Resolver {
if (modifiers.isFinal()) {
if (!isImplicitlyInitialized && (variable.getValue() == null)) {
onError(variable.getName(), ResolverErrorCode.CONSTANTS_MUST_BE_INITIALIZED);
- } else if (isImplicitlyInitialized && (variable.getValue() != null)) {
- onError(variable.getName(), ResolverErrorCode.CANNOT_BE_INITIALIZED);
- } else if (modifiers.isStatic() && modifiers.isFinal() && variable.getValue() != null) {
+ } else if (modifiers.isStatic() && variable.getValue() != null) {
resolve(variable.getValue());
node.setType(variable.getValue().getType());
}

Powered by Google App Engine
This is Rietveld 408576698