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

Turn abnormal CompilerError into regular Panic #7651

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Aug 24, 2023

Pull Request Description

Fixes #7582 by turning ComplerError (during construction of Truffle nodes in IrToTruffle) into PanicException. That way the abnormal situation turns into a regular panic. Such a panic can be caught or let to be propagated - just like any other panic during execution.

Important Notes

This is a safety net fix. Investigation of targeted, better fix may continue.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • All code follows the
    Scala,
    Java,
  • All code has been tested:
    • Unit tests have been written where possible.

@4e6
Copy link
Contributor

4e6 commented Aug 24, 2023

Shouldn't we turn a._ into a lambda x-> a.x instead of an error?

@JaroslavTulach
Copy link
Member Author

Shouldn't we turn a._ into a lambda x-> a.x instead of an error?

Interesting idea, but is it correct?

x -> a.x doesn't mean that x is used on a. It means to invoke symbol "x" on a - e.g. the x variable would be unused.

My (a language semantic amateur) conclusion: No, we shall not turn a._ into x->a.x.

@JaroslavTulach JaroslavTulach merged commit 59a8303 into develop Aug 25, 2023
@JaroslavTulach JaroslavTulach deleted the wip/jtulach/NoPanic_7582 branch August 25, 2023 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

op1._ yields: Compiler Internal Error: Qualified names should not be present at codegen time
3 participants