Skip to content
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

Set primary constructor only when there's a single constructor #313

Closed
Schahen opened this issue Jun 18, 2020 · 0 comments
Closed

Set primary constructor only when there's a single constructor #313

Schahen opened this issue Jun 18, 2020 · 0 comments
Labels
better-translation Code is translated and even useable, but can be better
Milestone

Comments

@Schahen
Copy link
Contributor

Schahen commented Jun 18, 2020

Current behaviour is quite tricky and actually does not make much sense. We tell apart "native" constructors and "generated" ones (one that are created after unrolling union types) - for native we always took first constructor and make it primary, for generated we make primary only if there's one left (for some mysterious reason).

Actually there's no practical benefits from this.
Also, apart from other things it will lead for one less node lowering - and current trend is to lower node phase as much as possible.

@Schahen Schahen added the better-translation Code is translated and even useable, but can be better label Jun 18, 2020
@Schahen Schahen added this to the 0.5.3 milestone Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better-translation Code is translated and even useable, but can be better
Projects
None yet
Development

No branches or pull requests

1 participant