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

Unresolved constructor in a case statement seems to lack a correlated source reference #8976

Closed
radeusgd opened this issue Feb 5, 2024 · 2 comments · Fixed by #9025
Closed
Assignees
Labels

Comments

@radeusgd
Copy link
Member

radeusgd commented Feb 5, 2024

The repro seems to be fairly simple:

foo x = case x of
    Index_Sub_Range.Sample _ _ -> 1
    _ -> 2

main = foo 3

(note no imports at the top)

Actual behaviour

It yields:

<Unknown source>: error: The name `Index_Sub_Range.Sample` could not be found.
Aborting due to 1 errors and 0 warnings.
Execution finished with an error: Compilation aborted due to errors.

This is quite problematic as if such an error occurs during a bigger refactor it may be relatively hard to find the root cause of the error - we do not even know which file the error occurs in.

Expected behaviour

We should had source location as in all kinds of other errors.

@radeusgd
Copy link
Member Author

radeusgd commented Feb 5, 2024

Maybe better showing is a repro on nonexistent types:

foo x = case x of
    Foo.Bar _ _ -> 1
    _ -> 2

main = foo 3
<Unknown source>: error: The name `Foo.Bar` could not be found.
Aborting due to 1 errors and 0 warnings.
Execution finished with an error: Compilation aborted due to errors.

but they both demonstrate essentially the same issue.

@enso-bot
Copy link

enso-bot bot commented Feb 13, 2024

Jaroslav Tulach reports a new STANDUP for yesterday (2024-02-12):

Progress: - fixing #8976 by #9025

Next Day: Bugfixing and planning

Discord
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants