-
Notifications
You must be signed in to change notification settings - Fork 364
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
New (?) Scala Native 3.2.1 warnings #2952
Comments
Removed more shrubbery and found:
|
Probably it's a regression in the compiler. It's only present for classes defined in local scope like methods. I'll try to ask the compiler team is it actual regression or insight from the compiler about actual problem. However, I think that's just a false negative warning. |
Created an issue in dotty scala/scala3#16259 |
Seems it's an actual issue - the local class leads to unsoundness - it's a situation when even though something might compile and have correct types it might not be actually checked in the runtime. I'm not sure if it only applies to JVM, but probably we should move the locally defined classes to the outer scope. |
Thank you for digging into this. I will look at those two files later today or tomorrow. Not my or our biggest problems, but it is nice to work with clean decks. |
Wojciech, I do not want to place you in the middle.
I am only a provincial, but this looks like, smell like, and I agree that True The code which triggers this new(?) warning looks like the above. The other site in SN has the same Sorry to be slow, but why can't the type check happen at runtime I use local classes all over the place, usually to limit scope. Mechanically, it appears easy enough to move the class just outside Others reading the code will, or strongly should, surely ask about the weirdness. Thanks, Lee |
In the case of the |
Scala 3.2.1, SN 0.5.0-SNAPSHOT approx 2022-10-28T02:00
I have been trying to cut some of the build warnings out of the SN 3.2.0
(now 3.2.1) build so that I could see any build defects I might be
introducing.
When I reduced the shrubbery, this popped up. Does not look like mine
and it looks new.
Question before the house: Is the test broken and should be fixed or removed or did something in the compiler change?
The text was updated successfully, but these errors were encountered: