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

Internal compiler error on invalid field name in struct literal #3990

Closed
ben0x539 opened this Issue Nov 16, 2012 · 3 comments

Comments

Projects
None yet
4 participants
@ben0x539
Contributor

ben0x539 commented Nov 16, 2012

This prints an ICE in addition to the expected diagnostic:

struct S {
    x: int
}

fn main() {
    S { y: 1 };
}

error: internal compiler error: no type for node 8: expr 1 (id=8) in fcx 7f8a6449c480

I half-remember hearing that this is already known a while ago, but I couldn't find an issue for it and it's still happening. Sorry if this is redundant.

@ghost ghost assigned catamorphism Nov 24, 2012

@ben0x539

This comment has been minimized.

Show comment
Hide comment
@ben0x539

ben0x539 Mar 22, 2013

Contributor

Can't reproduce this anymore.

Contributor

ben0x539 commented Mar 22, 2013

Can't reproduce this anymore.

@ben0x539 ben0x539 closed this Mar 22, 2013

@pnkfelix pnkfelix reopened this Mar 25, 2013

@pnkfelix

This comment has been minimized.

Show comment
Hide comment
@pnkfelix

pnkfelix Mar 25, 2013

Member

I was actually just able to reproduce this on commit c202430.

% rustc /tmp/foo.rs 
/tmp/foo.rs:3:16: 3:20 error: structure has no field named `y`
/tmp/foo.rs:3 fn main() { S { y: 1 }; }
                              ^~~~
/tmp/foo.rs:3:12: 3:13 error: missing field: `x`
/tmp/foo.rs:3 fn main() { S { y: 1 }; }
                          ^
error: internal compiler error: no type for node 8: expr 1 (id=8) in fcx 7fc245a679a0

Its a bit strange, since we are already issuing errors for the problems. But an ICE is an ICE.

(Also, this need not be addressed for the 0.6 timeframe.)

Member

pnkfelix commented Mar 25, 2013

I was actually just able to reproduce this on commit c202430.

% rustc /tmp/foo.rs 
/tmp/foo.rs:3:16: 3:20 error: structure has no field named `y`
/tmp/foo.rs:3 fn main() { S { y: 1 }; }
                              ^~~~
/tmp/foo.rs:3:12: 3:13 error: missing field: `x`
/tmp/foo.rs:3 fn main() { S { y: 1 }; }
                          ^
error: internal compiler error: no type for node 8: expr 1 (id=8) in fcx 7fc245a679a0

Its a bit strange, since we are already issuing errors for the problems. But an ICE is an ICE.

(Also, this need not be addressed for the 0.6 timeframe.)

@metajack

This comment has been minimized.

Show comment
Hide comment
@metajack

metajack May 16, 2013

Contributor

The ICE seems to have been fixed. This is the only error now as of commit 7012c42:

/tmp/something.rs:6:8: 6:12 error: structure has no field named `y`
/tmp/something.rs:6     S { y: 1 };
                            ^~~~
error: aborting due to previous error
Contributor

metajack commented May 16, 2013

The ICE seems to have been fixed. This is the only error now as of commit 7012c42:

/tmp/something.rs:6:8: 6:12 error: structure has no field named `y`
/tmp/something.rs:6     S { y: 1 };
                            ^~~~
error: aborting due to previous error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment