|
33 | 33 | % is a compile-time error except when it is a getter/setter pair. |
34 | 34 | % - Change grammar to enable non-function type aliases. Correct rule for |
35 | 35 | % invoking `F.staticMethod()` where `F` is a type alias. |
| 36 | +% - Add missing error for cyclic redirecting generative constructor. |
36 | 37 | % |
37 | 38 | % 2.8 - 2.10 |
38 | 39 | % - Change several warnings to compile-time errors, matching the actual |
@@ -3651,6 +3652,15 @@ \subsubsection{Generative Constructors} |
3651 | 3652 | actual arguments to function invocations in general.% |
3652 | 3653 | } |
3653 | 3654 |
|
| 3655 | +\LMHash{}% |
| 3656 | +A redirecting generative constructor $q'$ is \Index{redirection-reachable} |
| 3657 | +from a redirecting generative constructor $q$ if{}f |
| 3658 | +$q'$ is the redirectee constructor of $q$, |
| 3659 | +or $q''$ is the redirectee constructor of $q$ |
| 3660 | +and $q'$ is redirection-reachable from $q''$. |
| 3661 | +It is a compile-time error if a redirecting generative constructor |
| 3662 | +is redirection-reachable from itself. |
| 3663 | + |
3654 | 3664 | \LMHash{}% |
3655 | 3665 | When $\ConstMetavar$ is \CONST, |
3656 | 3666 | it is a compile-time error if the redirectee is not a constant constructor. |
@@ -4458,7 +4468,8 @@ \subsubsection{Inheritance and Overriding} |
4458 | 4468 | they declared or inherited (\ref{scoping}, \ref{classes}). |
4459 | 4469 | \item Static members are never inherited. |
4460 | 4470 | \item It is an error if you have a static member named $m$ in your class |
4461 | | - and an instance member of the same name (\ref{classMemberConflicts}). |
| 4471 | + and an instance member of the same basename |
| 4472 | + (\ref{classMemberConflicts}). |
4462 | 4473 | \item It is an error if you have a static setter \code{$v$=}, |
4463 | 4474 | and an instance member $v$ (\ref{setters}). |
4464 | 4475 | \item It is an error if you have a static getter $v$ |
@@ -4511,8 +4522,8 @@ \subsubsection{Inheritance and Overriding} |
4511 | 4522 | for a method in its interface |
4512 | 4523 | unless it has a non-trivial \code{noSuchMethod} |
4513 | 4524 | (\ref{theMethodNoSuchMethod}). |
4514 | | -\item The identifier of a named constructor cannot be |
4515 | | - the same as the name of a static member declared in the same class |
| 4525 | +\item The identifier of a named constructor cannot be the same as |
| 4526 | + the basename of a static member declared in the same class |
4516 | 4527 | (\ref{classMemberConflicts}). |
4517 | 4528 | \end{enumerate}% |
4518 | 4529 | } |
|
0 commit comments