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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java

Issue 47753002: Issue 14306. It is compile-time error to reference non-constructor in const redirecting constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix for review comment Created 7 years, 2 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: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java
index 2c7c301b3f3a5b59ec21b19804c3229cdb3435ec..f4fd89603a3ec9478b2e926ef7d1e9928dfeba9d 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java
@@ -1634,8 +1634,11 @@ public class ErrorVerifier extends RecursiveASTVisitor<Void> {
if (redirectedConstructor.getName() != null) {
constructorStrName += '.' + redirectedConstructor.getName().getName();
}
+ ErrorCode errorCode = node.getConstKeyword() != null
+ ? CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR
+ : StaticWarningCode.REDIRECT_TO_MISSING_CONSTRUCTOR;
errorReporter.reportError(
- StaticWarningCode.REDIRECT_TO_MISSING_CONSTRUCTOR,
+ errorCode,
redirectedConstructor,
constructorStrName,
redirectedType.getDisplayName());

Powered by Google App Engine
This is Rietveld 408576698