Skip to content

Fix #1653: Check "no inherit from final" earlier. #1666

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

Merged
merged 2 commits into from
Nov 16, 2016

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Nov 6, 2016

The test case is an illegal inheritance from a primitive value class,
which makes this an illegal value class. Previously, the error was
detected by refchecks, but crashes occurred earlier (when generating
synthesized methods) or at the same phase block (in extension methods).

The problem is avoided by moving the test to Namer.

Review by @smarter.

The test case is an illegal inheritance from a primitive value class,
which makes this an illegal value class. Previously, the error was
detected by refchecks, but crashes occured earlier (when generating
synthesized methods) or at the same phase block (in extension methods).

The problem is avoided by moving the test to Namer.

Review by @smarter.
@smarter
Copy link
Member

smarter commented Nov 6, 2016

#1670 could be fixed in the same way

@DarkDimius
Copy link
Contributor

I propose to reconsider this implementation.
This check can safely go into Infotransformer of RefChecks instead of making typer\namer responsible of even more stuff.

After refactoring, one test (cannot extend final class) shadowed the others,
which wer done in a later phase.

Splitting in two to get all errors again.
@odersky odersky merged commit 443f93f into scala:master Nov 16, 2016
@allanrenucci allanrenucci deleted the fix-#1653 branch December 14, 2017 16:59
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