summary refs log tree commit diff stats
path: root/tests/vm/ttouintconv.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm/ttouintconv.nim')
-rw-r--r--tests/vm/ttouintconv.nim11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/vm/ttouintconv.nim b/tests/vm/ttouintconv.nim
index 403de8f41..8c43a3adb 100644
--- a/tests/vm/ttouintconv.nim
+++ b/tests/vm/ttouintconv.nim
@@ -69,9 +69,16 @@ macro foo2() =
   echo zz
 
   var ww = -9
-  var vv = ww.uint
-  var kk = vv.uint32
+  var vv = cast[uint](ww)
+  var kk = cast[uint32](vv)
   echo kk
 
 foo()
 foo2()
+
+block:
+  const neg5VM = block:
+    let x = -5'i8
+    uint64(x)
+  let y = -5'i8
+  doAssert uint64(y) == neg5VM