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

Very unfriendly compiler error #1000

Closed
phated opened this issue Oct 22, 2021 · 3 comments · Fixed by #1200
Closed

Very unfriendly compiler error #1000

phated opened this issue Oct 22, 2021 · 3 comments · Fixed by #1200
Assignees

Comments

@phated
Copy link
Member

phated commented Oct 22, 2021

If a user writes this program:

let foo = ""

foo.charAt(0)

Nothing is reported in the LSP, and then when you go to compile the program, the compiler crashes with:

grainc.exe: internal error, uncaught exception:
                   (Failure "Impossible: deprecated error type in typetexp")

I was only able to debug this by changing the compiler to output the identifier name. How should we handle this better?

@marcusroberts marcusroberts self-assigned this Oct 31, 2021
@marcusroberts
Copy link
Member

I'll take a look at why the LSP is silent

@marcusroberts
Copy link
Member

Oh, it will be if the compiler errors. It should indicate there's been a problem though I think,

@ospencer
Copy link
Member

@marcusroberts it's silent because it's an error that's not handled by the compiler.

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

Successfully merging a pull request may close this issue.

3 participants