From 0e4db01a2592a813dfd0acdf7910ff4473c97203 Mon Sep 17 00:00:00 2001 From: Erik Ernst Date: Fri, 18 Jul 2025 18:04:10 +0200 Subject: [PATCH] Add rule to avoid generating wrong default constructor in mixin application --- specification/dartLangSpec.tex | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/specification/dartLangSpec.tex b/specification/dartLangSpec.tex index 47f9d999a..9645ce59a 100644 --- a/specification/dartLangSpec.tex +++ b/specification/dartLangSpec.tex @@ -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}