doc: explain how type parameters interact with `new` in parametric constructors (#61442)
The constructors documentation used `new` with implicit and explicit type parameters in examples without clearly stating the underlying rule. This adds a subsection explaining that `new` inherits the type parameters from the curly braces on the inner constructor name, when explicit parameters are needed, and what happens when the constructor name has fewer parameters than the type requires. The existing explanation in the "Outer-only constructors" section is also updated to reference this rule. The rules described here were determined empirically, as the existing documentation did not specify them. If any details are inaccurate, corrections are welcome. --------- Co-authored-by: James Wrigley <JamesWrigley@users.noreply.github.com>
A
Arno Strouwen committed
6bd20ed92ac1e4cb41d50d4ee05775819eeb9683
Parent: cdfacbb
Committed by GitHub <noreply@github.com>
on 5/15/2026, 11:43:22 PM