-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Safer Exceptions throws clauses have stopped working #17040
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
Comments
Can you provide me with more details? |
I tried it again, and it was still broken for me so I looked a bit deeper: The problem is reproducible only after an incremental build of Dotty from an earlier commit. The following should show the problem with fail.scala is the minimised code above: # inside lampepfl/dotty repo:
git checkout f02f7dda64
bin/scalac fail.scala
# builds previous version of scalac and compiles successfully
git checkout e422066c3d
bin/scalac fail.scala
# builds "next" version of scalac and and shows the error message above I was able to avoid the problem by cloning a fresh Dotty repository and rebuilding from clean. So, you're right, the error is not reproducible in general. Sorry for wasting your time, @natsukagami. Hopefully this is useful for anyone else who is building Dotty from source, though. |
It seems like a problem with library rebuilding. I’m not sure what’s the
best way to resolve it either, but usually a clean build fixes it ;)
Benoît ***@***.***> schrieb am Di. 7. März 2023 um 12:13 PM:
… Closed #17040 <#17040> as
completed.
—
Reply to this email directly, view it on GitHub
<#17040 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACFEK2P6IJP4YVOVCTCXGYTW24J6ZANCNFSM6AAAAAAVO5ZIDA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
One should never require a clean build. Something must be wrong with the logic that requires this. It's usually some piece of state that should not exist. |
What happened was that the cached import language.experimental.saferExeptions
def fail: Int throws Exception = ??? will cause the compiler to crash, since |
I think this is a TASTy incompatibility problem...? |
Uh oh!
There was an error while loading. Please reload this page.
Compiler version
The problem is introduced in e422066.
Minimized code
Output
It compiles normally with a
using CanThrow[Exception]
clause instead ofthrows Exception
.Expectation
Same behavior as for
using
clause.The text was updated successfully, but these errors were encountered: