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

Resiliant error cascade #7648

Open
JonathanStarup opened this issue Apr 29, 2024 · 1 comment
Open

Resiliant error cascade #7648

JonathanStarup opened this issue Apr 29, 2024 · 1 comment

Comments

@JonathanStarup
Copy link
Contributor

def example(): Unit \ SomeEffect = checked_ecast(())

This program has the errors

-- Resolution Error -------------------------------------------------- [...]\test.flix
>> Undefined type 'SomeEffect'.
8 | def example(): Unit \ SomeEffect = checked_ecast(())
                          ^^^^^^^^^^
                          type not found.


-- Redundancy Error -------------------------------------------------- [...]\test.flix
>> Redundant effect cast. The expression already has the required effect.
8 | def example(): Unit \ SomeEffect = checked_ecast(())
                                       ^^^^^^^^^^^^^^^^^
                                       redundant cast.

So it seems that it continues typing with the pure effect, but instead it would perhaps be better to continue with the non-existing effect SomeEffect or in some other way remember that there is a constant effect

@magnus-madsen
Copy link
Member

I am looking for a general solution (but I don't have one yet)

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

No branches or pull requests

2 participants