Closed
Description
Illustrative code provided by cmr:
mod Foo {
pub static X: int = 42;
}
#[deriving(Show)]
enum Foo {
X
}
fn main() {
println!("{}", Foo::X);
let x: Foo = X;
println!("{}", x);
}
The above should not be legal: one should not be able to declare the mod Foo
item in the same scope as the enum Foo
item.
But the following playpen appears to accept it, at the moment.