Closed
Description
I'm not even sure if this should work, but it does pass typechecking.
enum Animal {
Dog (~str, float),
Cat { name: ~str, weight: float }
}
fn main() {
let mut a: Animal = Dog(~"Cocoa", 37.2);
a = Cat{ name: ~"Spotty", weight: 2.7 };
}
This yields an ICE in trans:
error: internal compiler error: iter_variant: not a function type
The message is from trans::base::iter_structural_ty
.