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

Compiler panics when accessing a field of a temporary #225

Closed
jDomantas opened this issue Jun 14, 2020 · 2 comments · Fixed by #232
Closed

Compiler panics when accessing a field of a temporary #225

jDomantas opened this issue Jun 14, 2020 · 2 comments · Fixed by #232
Labels
exp: intermediate Achievable by experienced contributors, or with some guidance pri: high An issue resulting in complete or substantial loss of functionality, that can be circumvented type: fix Bug fix or report
Milestone

Comments

@jDomantas
Copy link

Trying to compile this:

struct Num {
    value: i64,
}

pub fn foo() {
    Num { value: 0 }.value;
}

results in

thread 'main' panicked at 'internal error: entered unreachable code: invalid place expression', <::std::macros::panic macros>:5:6
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@baszalmstra
Copy link
Collaborator

Thats a good find! I did not think of trying that. I'll take a look asap! :)

@baszalmstra baszalmstra added pri: high An issue resulting in complete or substantial loss of functionality, that can be circumvented type: fix Bug fix or report exp: intermediate Achievable by experienced contributors, or with some guidance labels Jun 19, 2020
baszalmstra added a commit to baszalmstra/mun that referenced this issue Jun 19, 2020
baszalmstra added a commit to baszalmstra/mun that referenced this issue Jun 19, 2020
@baszalmstra
Copy link
Collaborator

Took me a while but I finally created a PR that fixes this issue (#232)

baszalmstra added a commit to baszalmstra/mun that referenced this issue Jun 20, 2020
baszalmstra added a commit to baszalmstra/mun that referenced this issue Jun 23, 2020
baszalmstra added a commit to baszalmstra/mun that referenced this issue Jun 23, 2020
baszalmstra added a commit that referenced this issue Jun 23, 2020
@Wodann Wodann added this to the Mun v0.3.0 milestone Jun 23, 2020
Wodann pushed a commit that referenced this issue Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp: intermediate Achievable by experienced contributors, or with some guidance pri: high An issue resulting in complete or substantial loss of functionality, that can be circumvented type: fix Bug fix or report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants