Jed Davis | 3e7ab3a | 2013-01-05 02:43:36 | [diff] [blame] | 1 | // Copyright 2013 The Rust Project Developers. See the COPYRIGHT |
| 2 | // file at the top-level directory of this distribution and at |
| 3 | // http://rust-lang.org/COPYRIGHT. |
| 4 | // |
| 5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
| 6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
| 7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your |
| 8 | // option. This file may not be copied, modified, or distributed |
| 9 | // except according to those terms. |
| 10 | |
| 11 | enum Foo { |
| 12 | Bar = 0xDEADBEE |
| 13 | } |
| 14 | |
Patrick Walton | 85c9fc6 | 2013-03-22 21:00:15 | [diff] [blame] | 15 | static X: Foo = Bar; |
Jed Davis | 3e7ab3a | 2013-01-05 02:43:36 | [diff] [blame] | 16 | |
Graydon Hoare | 89c8ef7 | 2013-02-02 03:43:17 | [diff] [blame] | 17 | pub fn main() { |
Corey Richardson | cc57ca0 | 2013-05-19 02:02:45 | [diff] [blame] | 18 | assert_eq!((X as uint), 0xDEADBEE); |
| 19 | assert_eq!((Y as uint), 0xDEADBEE); |
Jed Davis | 3e7ab3a | 2013-01-05 02:43:36 | [diff] [blame] | 20 | } |
Jed Davis | 79f0d67 | 2013-01-04 09:22:56 | [diff] [blame] | 21 | |
Patrick Walton | 85c9fc6 | 2013-03-22 21:00:15 | [diff] [blame] | 22 | static Y: Foo = Bar; |