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

implement error when assigning to a field of a constant struct #48

Closed
andrewrk opened this issue Jan 6, 2016 · 0 comments
Closed

implement error when assigning to a field of a constant struct #48

andrewrk opened this issue Jan 6, 2016 · 0 comments
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase.
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Jan 6, 2016

struct Foo {
    field: i32,
}

fn f() {
    const f : Foo = {.field = 1234,};
    f.field = 0; // should be an error
}
@andrewrk andrewrk added the enhancement Solving this issue will likely involve adding new logic or components to the codebase. label Jan 6, 2016
@andrewrk andrewrk modified the milestone: 0.1.0 May 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase.
Projects
None yet
Development

No branches or pull requests

1 participant