Skip to content

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Jul 5, 2025

Fixes #23477

The primary constructor is private, so that the default arg is private in the companion module.

Default arg access must be widened because it is used from the auxiliary constructor.

Normally, this requires mangling the member name. Since the mangling was not encoded correctly, it can just use the existing name with the standard encoding (which ensures no conflicts; constructors are not inherited and overloads cannot both define defaults).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler crashes on private constructor with default argument when running with -Ycheck:all
2 participants