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

Access to arrays is broken for non-array accesses #831

Open
kikofernandez opened this issue Jun 27, 2017 · 0 comments
Open

Access to arrays is broken for non-array accesses #831

kikofernandez opened this issue Jun 27, 2017 · 0 comments
Labels

Comments

@kikofernandez
Copy link
Contributor

The problem is that the parser considers an ArrayAccess anything that matches x(y) = z. The typechecker goes along and considers that the AST node given by the parser is an array, and tries to typecheck it incorrectly, crashing the compiler.

This has been shown in #823 and also in this example:

active class Main
  def main(): unit
    val x = 3
    x(1) = 2
  end
end

Error thrown:

encorec: No match in record selector argTypes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant