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

Support += with record #1318

Closed
phated opened this issue Jun 10, 2022 · 0 comments · Fixed by #1320
Closed

Support += with record #1318

phated opened this issue Jun 10, 2022 · 0 comments · Fixed by #1320

Comments

@phated
Copy link
Member

phated commented Jun 10, 2022

Given the following code, I receive this parser error:

Syntax error after 'idx' and before '+='.
Expected an infix operator to continue the expression or a newline character to terminate it.

record Foo {
    mut idx: Number
}

let foo = { idx: 1}

foo.idx += 1

I believe the += operator should allowed to be used on mutable record fields.

@ospencer ospencer changed the title Parser syntax error on += with record Support += with record Jun 11, 2022
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.

1 participant