| Index: pkg/analyzer/lib/src/error/codes.dart
|
| diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
|
| index df5e5eeb84e2bb3759548f36402c1836ad2c171f..48df41b741e95b3072131ecdaf979932f813baa8 100644
|
| --- a/pkg/analyzer/lib/src/error/codes.dart
|
| +++ b/pkg/analyzer/lib/src/error/codes.dart
|
| @@ -980,10 +980,30 @@ class CompileTimeErrorCode extends ErrorCode {
|
| static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS =
|
| const CompileTimeErrorCode(
|
| 'EXTRA_POSITIONAL_ARGUMENTS',
|
| - "{0} positional arguments expected, but {1} found.",
|
| + "Too many positional arguments: {0} expected, but {1} found.",
|
| "Try removing the extra arguments.");
|
|
|
| /**
|
| + * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m <
|
| + * h</i> or if <i>m > n</i>.
|
| + *
|
| + * 16.12.2 Const: It is a compile-time error if evaluation of a constant
|
| + * object results in an uncaught exception being thrown.
|
| + *
|
| + * Parameters:
|
| + * 0: the maximum number of positional arguments
|
| + * 1: the actual number of positional arguments given
|
| + *
|
| + * See [NOT_ENOUGH_REQUIRED_ARGUMENTS].
|
| + */
|
| + static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED =
|
| + const CompileTimeErrorCode(
|
| + 'EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED',
|
| + "Too many positional arguments: {0} expected, but {1} found.",
|
| + "Try removing the extra positional arguments, "
|
| + "or specifying the name for named arguments.");
|
| +
|
| + /**
|
| * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
|
| * is a compile time error if more than one initializer corresponding to a
|
| * given instance variable appears in <i>k</i>'s list.
|
| @@ -3507,10 +3527,27 @@ class StaticWarningCode extends ErrorCode {
|
| static const StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS =
|
| const StaticWarningCode(
|
| 'EXTRA_POSITIONAL_ARGUMENTS',
|
| - "{0} positional arguments expected, but {1} found.",
|
| + "Too many positional arguments: {0} expected, but {1} found.",
|
| "Try removing the extra positional arguments.");
|
|
|
| /**
|
| + * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m <
|
| + * h</i> or if <i>m > n</i>.
|
| + *
|
| + * Parameters:
|
| + * 0: the maximum number of positional arguments
|
| + * 1: the actual number of positional arguments given
|
| + *
|
| + * See [NOT_ENOUGH_REQUIRED_ARGUMENTS].
|
| + */
|
| + static const StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED =
|
| + const StaticWarningCode(
|
| + 'EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED',
|
| + "Too many positional arguments: {0} expected, but {1} found.",
|
| + "Try removing the extra positional arguments, "
|
| + "or specifying the name for named arguments.");
|
| +
|
| + /**
|
| * 5. Variables: It is a static warning if a final instance variable that has
|
| * been initialized at its point of declaration is also initialized in a
|
| * constructor.
|
|
|