| 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 a7d664275bce935e3dea3361b3135d3807bbdf01..ad09f95f26a83f210d538e66cca81cf6c0349668 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/warnings.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
|
| @@ -587,7 +587,7 @@ main() {
|
| static const MessageKind TYPEDEF_FORMAL_WITH_DEFAULT = const MessageKind(
|
| "Error: A parameter of a typedef can't specify a default value.",
|
| howToFix:
|
| - "Try removing the default value or making the parameter optional.",
|
| + "Try removing the default value.",
|
| examples: const ["""
|
| typedef void F([int arg = 0]);
|
|
|
| @@ -600,6 +600,22 @@ main() {
|
| F f;
|
| }"""]);
|
|
|
| + static const MessageKind FUNCTION_TYPE_FORMAL_WITH_DEFAULT = const MessageKind(
|
| + "Error: A function type parameters can't specify a default value.",
|
| + howToFix:
|
| + "Try removing the default value.",
|
| + examples: const ["""
|
| +foo(void f(int i, [a = 1]) {}
|
| +
|
| +main() {
|
| + foo(1, 2);
|
| +}""", """
|
| +foo(void f(int i, {a: 1}) {}
|
| +
|
| +main() {
|
| + foo(1, a: 2);
|
| +}"""]);
|
| +
|
| static const MessageKind FORMAL_DECLARED_CONST = const MessageKind(
|
| "Error: A formal parameter can't be declared const.",
|
| howToFix: "Try removing 'const'.",
|
|
|