blob: 30fbe38aed033f71af342dfce3a3c1f840ffb39e [file] [log] [blame]
Jed Davis3e7ab3a2013-01-05 02:43:361// 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
11enum Foo {
12 Bar = 0xDEADBEE
13}
14
Patrick Walton85c9fc62013-03-22 21:00:1515static X: Foo = Bar;
Jed Davis3e7ab3a2013-01-05 02:43:3616
Graydon Hoare89c8ef72013-02-02 03:43:1717pub fn main() {
Corey Richardsoncc57ca02013-05-19 02:02:4518 assert_eq!((X as uint), 0xDEADBEE);
19 assert_eq!((Y as uint), 0xDEADBEE);
Jed Davis3e7ab3a2013-01-05 02:43:3620}
Jed Davis79f0d672013-01-04 09:22:5621
Patrick Walton85c9fc62013-03-22 21:00:1522static Y: Foo = Bar;