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

ICE initializing tuple-struct with field initializers #4736

Closed
brson opened this issue Feb 1, 2013 · 4 comments
Closed

ICE initializing tuple-struct with field initializers #4736

brson opened this issue Feb 1, 2013 · 4 comments
Labels
A-type-system Area: Type system I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Milestone

Comments

@brson
Copy link
Contributor

brson commented Feb 1, 2013

struct NonCopyable(());

fn main() {
    let z = NonCopyable { p: () };
}
/home/brian/dev/rust/src/test/run-pass/test.rs:4:26: 4:31 error: structure has no field named `p`
/home/brian/dev/rust/src/test/run-pass/test.rs:4     let z = NonCopyable { p: () };
                                                                           ^~~~~
/home/brian/dev/rust/src/test/run-pass/test.rs:4:12: 4:23 error: missing fields: `__field__`, `__field__`
/home/brian/dev/rust/src/test/run-pass/test.rs:4     let z = NonCopyable { p: () };
                                                             ^~~~~~~~~~~
error: internal compiler error: no type for node 11: expr () (id=11) in fcx 2b8288481970
@catamorphism
Copy link
Contributor

I'm bumping this sooner because I think ICEs are important to squash and also because I'm working on another tuple-struct bug, so maybe I can grab this easily.

@ghost ghost assigned catamorphism Feb 7, 2013
@catamorphism
Copy link
Contributor

I fixed this bug in my branch, but have decided to revamp how typeck handles bot and ty_err types. This may be either a good idea or the best idea.

@catamorphism
Copy link
Contributor

I should actually be able to get this in for 0.6

@catamorphism
Copy link
Contributor

Fixed in 6aa612a , test case added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants