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

Unified Diff: pkg/dart_messages/lib/shared_messages.dart

Issue 1768143003: Use specific messages for const constructor with body. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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
Index: pkg/dart_messages/lib/shared_messages.dart
diff --git a/pkg/dart_messages/lib/shared_messages.dart b/pkg/dart_messages/lib/shared_messages.dart
index 5aa2cededb7a5963715c22b46f97fa240d8fe3e8..dc9c9a847d85c58900fe91ccce04a36d5c42425a 100644
--- a/pkg/dart_messages/lib/shared_messages.dart
+++ b/pkg/dart_messages/lib/shared_messages.dart
@@ -198,7 +198,7 @@ final Map<String, Message> MESSAGES = {
categories: [Category.parserError],
template: "Const constructor or factory can't have a body.",
howToFix: "Remove the 'const' keyword or the body.",
- usedBy: [dart2js],
+ usedBy: [],
examples: const [
r"""
class C {
@@ -221,7 +221,7 @@ final Map<String, Message> MESSAGES = {
categories: [Category.parserError],
template: "Const constructor can't have a body.",
howToFix: "Try removing the 'const' keyword or the body.",
- usedBy: [analyzer],
+ usedBy: [analyzer, dart2js],
examples: const [
r"""
class C {
@@ -240,7 +240,7 @@ final Map<String, Message> MESSAGES = {
"be 'const'.",
howToFix: "Try removing the 'const' keyword or replacing the body with "
"'=' followed by a valid target.",
- usedBy: [analyzer],
+ usedBy: [analyzer, dart2js],
examples: const [
r"""
class C {

Powered by Google App Engine
This is Rietveld 408576698