Chromium Code Reviews| 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 dbcab63845a57e207d591acf26d6ac936418d536..5788008eb5f238a6e598e84044f9c0e308839bf6 100644 |
| --- a/pkg/compiler/lib/src/diagnostics/messages.dart |
| +++ b/pkg/compiler/lib/src/diagnostics/messages.dart |
| @@ -186,9 +186,11 @@ enum MessageKind { |
| DUPLICATED_RESOURCE, |
| EMPTY_CATCH_DECLARATION, |
| EMPTY_ENUM_DECLARATION, |
| + EMPTY_NAMED_PARAMETER_LIST, |
| + EMPTY_OPTIONAL_PARAMETER_LIST, |
| EMPTY_HIDE, |
| - EQUAL_MAP_ENTRY_KEY, |
| EMPTY_SHOW, |
| + EQUAL_MAP_ENTRY_KEY, |
| EXISTING_DEFINITION, |
| EXISTING_LABEL, |
| EXPECTED_IDENTIFIER_NOT_RESERVED_WORD, |
| @@ -878,6 +880,36 @@ main() {}""" |
| }, |
| ]), |
| + MessageKind.EMPTY_OPTIONAL_PARAMETER_LIST: const MessageTemplate( |
| + MessageKind.EMPTY_OPTIONAL_PARAMETER_LIST, |
| + "Optional parameter lists cannot be empty.", |
| + howToFix: "Try adding an optional parameter to the list.", |
| + examples: const [ |
| + const { |
| + 'main.dart': """ |
| +foo({}) {} |
|
Johnni Winther
2016/07/08 07:30:52
The examples in these kinds are swapped: {} should
|
| + |
| +main() { |
| + foo(); |
| +}""" |
| + } |
| + ]), |
| + |
| + MessageKind.EMPTY_NAMED_PARAMETER_LIST: const MessageTemplate( |
| + MessageKind.EMPTY_NAMED_PARAMETER_LIST, |
| + "Named parameter lists cannot be empty.", |
| + howToFix: "Try adding a named parameter to the list.", |
| + examples: const [ |
| + const { |
| + 'main.dart': """ |
| +foo([]) {} |
| + |
| +main() { |
| + foo(); |
| +}""" |
| + } |
| + ]), |
| + |
| MessageKind.NOT_A_TYPE: const MessageTemplate( |
| MessageKind.NOT_A_TYPE, "'#{node}' is not a type."), |