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

Lang: Syntax error with with unbox operator #183

Closed
phated opened this issue Jul 1, 2020 · 0 comments · Fixed by #607
Closed

Lang: Syntax error with with unbox operator #183

phated opened this issue Jul 1, 2020 · 0 comments · Fixed by #607

Comments

@phated
Copy link
Member

phated commented Jul 1, 2020

This program doesn't parse:

data Container = {
    size: Box<Number>
}

let make = () => {
    { size: box(1) }
}

let getSize= (m) => {
  let size = ^m.size;
  size
}

let a = make();
print(getSize(a));

It gives this error:

$ grain test.gr 
File "test.gr", line 1, characters 0-0:
Error: The Grain compiler had trouble parsing your program.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants