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

Unified Diff: pkg/compiler/lib/src/resolution/constructors.dart

Issue 1156923007: Improve error for non-const implicit super constructor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 | pkg/compiler/lib/src/warnings.dart » ('j') | pkg/compiler/lib/src/warnings.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/constructors.dart
diff --git a/pkg/compiler/lib/src/resolution/constructors.dart b/pkg/compiler/lib/src/resolution/constructors.dart
index 28d5a3be33762a982e17fa9a63999f13a0a3c075..72ca1560f65c9d6e816d7be19430f22151cafeb6 100644
--- a/pkg/compiler/lib/src/resolution/constructors.dart
+++ b/pkg/compiler/lib/src/resolution/constructors.dart
@@ -192,8 +192,10 @@ class InitializerResolver {
visitor.compiler.reportError(diagnosticNode, kind);
} else if (caller.isConst
&& !lookedupConstructor.isConst) {
- visitor.compiler.reportError(
- diagnosticNode, MessageKind.CONST_CALLS_NON_CONST);
+ MessageKind kind = isImplicitSuperCall
+ ? MessageKind.CONST_CALLS_NON_CONST_FOR_IMPLICIT
+ : MessageKind.CONST_CALLS_NON_CONST;
+ visitor.compiler.reportError(diagnosticNode, kind);
}
}
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/warnings.dart » ('j') | pkg/compiler/lib/src/warnings.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698