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

Make sure inner classes are checked first #15527

Merged
merged 2 commits into from
Jun 27, 2022

Conversation

liufengyun
Copy link
Contributor

Make sure inner classes are checked first

This will produce better diagnosis messages. This is because Dotty only shows the first error
detected for the same line to end users. If we check inner classes first, the scope of the
error is restricted to the inner class whenever possible (instead of involving the outer class).

This will produce better diagnosis messages. This is because Dotty only show the first error
detected for the same line to end users. If we check inner classes first, the scope of the
error is restricted to the inner class whenever possible (instead of involving the outer class).
Copy link
Contributor

@olhotak olhotak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This also simplifies some of the warnings when running the initialization checker on the compiler itself.

@liufengyun liufengyun marked this pull request as ready for review June 27, 2022 17:16
Co-authored-by: Ondřej Lhoták <olhotak@uwaterloo.ca>
@liufengyun liufengyun merged commit 4be1482 into scala:main Jun 27, 2022
@liufengyun liufengyun deleted the init-inner-first branch June 27, 2022 19:32
@Kordyjan Kordyjan added this to the 3.2.1 milestone Aug 1, 2023
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.

3 participants