Skip to content

Add rule to avoid generating wrong default constructor #4467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions specification/dartLangSpec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6191,6 +6191,18 @@ \subsection{Mixin Application}
If $S_q$ is a generative const constructor, and $M$ does not declare any
fields, $C_q$ is also a const constructor.

\LMHash{}%
If $S$ does not declare any generative constructors then the application
does not implicitly induce any forwarding constructors.
In particular, it does not induce a default constructor
(\ref{constructors}).

\commentary{%
The default constructor would have a superinitializer
that attempts to invoke a constructor that does not exist.
Developers would have no way to eliminate this error.%
}


\section{Extensions}
\LMLabel{extensions}
Expand Down