diff --git a/specification/dartLangSpec.tex b/specification/dartLangSpec.tex index a6bc07879..e06b3fbcc 100644 --- a/specification/dartLangSpec.tex +++ b/specification/dartLangSpec.tex @@ -47,6 +47,8 @@ % - Broaden the grammar rule about `initializerExpression` to match the % implemented behavior. Specify that an initializer expression can not be % a function literal. +% - Specify in which situations it is an error to declare an initializing +% formal parameter. % % Nov 2023 % - Specify that the dynamic error for calling a function in a deferred and @@ -4003,12 +4005,12 @@ \subsubsection{Generative Constructors} It is a compile-time error if \id{} is not also the name of an instance variable of the immediately enclosing class or enum. -\commentary{% -Note that it is a compile-time error for an initializing formal -to occur in any function which is not a non-redirecting generative constructor -(\ref{requiredFormals}), -so there is always an enclosing class or enum.% -} +\LMHash{}% +It is a compile-time error for an initializing formal parameter +to occur in any function which is not a generative constructor. +Also, it is a compile-time error for an initializing formal parameter +to occur in a redirecting or external constructor. +\commentary{In particuar, there is always an enclosing class or enum.} \LMHash{}% Assume that $p$ is a declaration of an initializing formal parameter named \id.