mozilla/rust — Issue #1688: Using a named constant in an alt branch binds the value to that name instead
Author: jdm
Created: 2012-01-27 20:39:49+00:00
State: open
Labels: bug

```
const FOO: int = 0;
const BAR: int = 1;

fn main() {
alt 1 {
FOO { #debug("FOO") }
BAR { #debug("BAR") }
};
}
```
yields the following error:
```
constalt.rs:7:6: 7:9 error: unreachable pattern
constalt.rs:7 BAR { #debug("BAR") }
^~~
```

If this is expected, it's counter-intuitive.