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

Don't check bounds of Java applications in Java units #18054

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jun 25, 2023

Something goes wrong when we try to do mutually recursive F-bounds checking in Java units. I am not sure what exactly. But in any case, Scala should not try to do Java's typechecking. So we now check applications in Java units only if they refer to Scala classes.

I added a test for #7494, which was originally addressed by #9370, the PR which introduced the Java bounds checking. Adding the test ensures that the new restrictions still flag the original error.

Fixes #17763

Something goes wrong when we try to do mutually recursive F-bounds checking in Java units.
I am not sure what exactly. But in any case, Scala should not try to do Java's typechecking.
So we now check applications in Java units only if they refer to Scala classes.

I added a test for scala#7494, which was originally addressed by scala#9370, the PR which introduced the Java bounds
checking. Adding the test ensures that the new restrictions still glag the original error.

Fixes scala#17763
For some reason it does not work with the testing farmework we have. Java sources cannot
find Scala artifacts when compiled in pass 2 with javac.
@smarter smarter merged commit c528979 into scala:main Jun 26, 2023
@smarter smarter deleted the fix-17763 branch June 26, 2023 11:48
@Kordyjan Kordyjan added this to the 3.4.0 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.

Scala 3.3 handling of recursive types in Java differ from javac and Scala 2.13
3 participants