summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-9837.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/issues/issue-9837.rs')
-rw-r--r--src/test/ui/issues/issue-9837.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-9837.rs b/src/test/ui/issues/issue-9837.rs
new file mode 100644
index 000000000..5d2c822a5
--- /dev/null
+++ b/src/test/ui/issues/issue-9837.rs
@@ -0,0 +1,11 @@
+// run-pass
+const C1: i32 = 0x12345678;
+const C2: isize = C1 as i16 as isize;
+
+enum E {
+ V = C2
+}
+
+fn main() {
+ assert_eq!(C2 as u64, E::V as u64);
+}