Closed
Description
The following code ICE's the compiler built from the 0.3 tarball:
enum whatever {
OneWay,
SameWay(int),
OtherWay
}
fn getWhatever() -> whatever {
SameWay(7)
}
fn main()
{
let what = getWhatever();
alt what{
OneWay | SameWay(foo) { io::println("oooh"); }
OtherWay { io::println("aaaaaahhhh"); }
};
}
The problem is that not all of the subcases produce the same binding site in the first branch of the alt. This seems to be related to issue #2869. Looks like this just be made a compilation error.