Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/warnings.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/warnings.dart b/sdk/lib/_internal/compiler/implementation/warnings.dart |
| index 7e8a8d344dba86b57997f909fe187d59d781063a..59055aead79bb4fed3df30f75f7db6944ff659df 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/warnings.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/warnings.dart |
| @@ -500,6 +500,18 @@ class MessageKind { |
| static const MessageKind CONSTRUCTOR_WITH_RETURN_TYPE = const MessageKind( |
| 'Error: Cannot have return type for constructor.'); |
| + static const MessageKind CANNOT_RETURN_FROM_CONSTRUCTOR = const MessageKind( |
| + "Error: Cannot return a value from a constructor.", |
|
ahe
2013/09/05 08:35:20
Prefer "can't" over "cannot" (the guidelines were
|
| + howToFix: "Remove the return statement or use a factory constructor.", |
| + examples: const [""" |
| +class C { |
| + C() { |
| + return 1; |
| + } |
| +} |
| + |
| +main() => new C();"""]); |
| + |
| static const MessageKind ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind( |
| 'Error: Cannot have final modifier on method.'); |