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

Better error message when indexing an index #1095

Closed
athas opened this issue Aug 23, 2020 · 0 comments
Closed

Better error message when indexing an index #1095

athas opened this issue Aug 23, 2020 · 0 comments

Comments

@athas
Copy link
Member

athas commented Aug 23, 2020

let main (xss: [][]i32) = xss[0][0]

This is parsed as "apply the function xss[0] to the argument [0]", which will always be wrong. It should be written xss[0,0]. I think it would be fairly easy to make the parser complain about this with a specific error message.

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

No branches or pull requests

1 participant