Skip to content

type errors are broken #1525

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

Closed
shriram opened this issue Sep 7, 2020 · 1 comment
Closed

type errors are broken #1525

shriram opened this issue Sep 7, 2020 · 1 comment

Comments

@shriram
Copy link
Member

shriram commented Sep 7, 2020

This program

fun f(x :: Number):
  x / "3"
end

reports the following type error:
image

Changing it to

fun f(x :: String):
  x / "3"
end

produces
image

It seems like somewhere the error-reporting mechanism is failing to recognize structures and is just printing them out literally?

@jpolitz
Copy link
Member

jpolitz commented Sep 7, 2020

I think your diagnosis is right, and “failing to recognize” is really that the print-for-compiler-debugging and print-for-user ended up being the same thing on these types.

Should be fixed by #1527

@jpolitz jpolitz closed this as completed Sep 9, 2020
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