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

Unified Diff: pkg/compiler/lib/src/diagnostics/messages.dart

Issue 1706033002: More shared messages. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/compiler/lib/src/diagnostics/messages.dart
diff --git a/pkg/compiler/lib/src/diagnostics/messages.dart b/pkg/compiler/lib/src/diagnostics/messages.dart
index 203ef60475133b3c610e3453205b832de270caac..d3dc5815ccd7511de615d330b788f089fac24d8a 100644
--- a/pkg/compiler/lib/src/diagnostics/messages.dart
+++ b/pkg/compiler/lib/src/diagnostics/messages.dart
@@ -136,7 +136,7 @@ enum MessageKind {
CANNOT_RESOLVE_IN_INITIALIZER,
CANNOT_RESOLVE_SETTER,
CANNOT_RESOLVE_TYPE,
- CANNOT_RETURN_FROM_CONSTRUCTOR,
+ RETURN_IN_GENERATIVE_CONSTRUCTOR,
CLASS_NAME_EXPECTED,
COMPILER_CRASHED,
COMPLEX_RETURNING_NSM,
@@ -1847,19 +1847,6 @@ main() {
const MessageTemplate(MessageKind.OPERATOR_NAMED_PARAMETERS,
"Operator '#{operatorName}' cannot have named parameters."),
- MessageKind.CANNOT_RETURN_FROM_CONSTRUCTOR:
- const MessageTemplate(MessageKind.CANNOT_RETURN_FROM_CONSTRUCTOR,
- "Constructors can't return values.",
- howToFix: "Remove the return statement or use a factory constructor.",
- examples: const ["""
-class C {
- C() {
- return 1;
- }
-}
-
-main() => new C();"""]),
-
MessageKind.ILLEGAL_FINAL_METHOD_MODIFIER:
const MessageTemplate(MessageKind.ILLEGAL_FINAL_METHOD_MODIFIER,
"Cannot have final modifier on method."),
@@ -3314,23 +3301,6 @@ main() sync* {
var yield;
}"""]),
- MessageKind.RETURN_IN_GENERATOR:
- const MessageTemplate(MessageKind.RETURN_IN_GENERATOR,
- "'return' with a value is not allowed in a method body using the "
- "'#{modifier}' modifier.",
- howToFix: "Try removing the value, replacing 'return' with 'yield' "
- "or changing the method body modifier.",
- examples: const [
-"""
-foo() async* { return 0; }
-main() => foo();
-""",
-
-"""
-foo() sync* { return 0; }
-main() => foo();
-"""]),
-
MessageKind.NATIVE_NOT_SUPPORTED:
const MessageTemplate(MessageKind.NATIVE_NOT_SUPPORTED,
"'native' modifier is not supported.",
« no previous file with comments | « pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698