| 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 4b2d1c7ac56e3100e157c502eb085f3e138dc851..fe1217679416383de8e343ccef32d28b1509cab9 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/warnings.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
|
| @@ -644,7 +644,7 @@ main() {
|
| }"""]);
|
|
|
| static const MessageKind FUNCTION_TYPE_FORMAL_WITH_DEFAULT = const MessageKind(
|
| - "Error: A function type parameters can't specify a default value.",
|
| + "Error: A function type parameter can't specify a default value.",
|
| howToFix:
|
| "Try removing the default value.",
|
| examples: const ["""
|
| @@ -659,6 +659,29 @@ main() {
|
| foo(1, a: 2);
|
| }"""]);
|
|
|
| + static const MessageKind REDIRECTING_FACTORY_WITH_DEFAULT = const MessageKind(
|
| + "Error: A parameter of a redirecting factory constructor can't specify a "
|
| + "default value.",
|
| + howToFix:
|
| + "Try removing the default value.",
|
| + examples: const ["""
|
| +class A {
|
| + A([a]);
|
| + factory A.foo([a = 1]) = A;
|
| +}
|
| +
|
| +main() {
|
| + new A.foo(1);
|
| +}""", """
|
| +class A {
|
| + A({a});
|
| + factory A.foo({a: 1}) = A;
|
| +}
|
| +
|
| +main() {
|
| + new A.foo(a: 1);
|
| +}"""]);
|
| +
|
| static const MessageKind FORMAL_DECLARED_CONST = const MessageKind(
|
| "Error: A formal parameter can't be declared const.",
|
| howToFix: "Try removing 'const'.",
|
|
|