tunsigned64mod.nim 406 B

12345678910111213141516171819202122232425
  1. # bug #1638
  2. let v1 = 7
  3. let v2 = 7'u64
  4. let t1 = v1 mod 2 # works
  5. let t2 = 7'u64 mod 2'u64 # works
  6. let t3 = v2 mod 2'u64 # Error: invalid type: 'range 0..1(uint64)
  7. let t4 = (v2 mod 2'u64).uint64 # works
  8. # bug #2550
  9. var x: uint # doesn't work
  10. doAssert x mod 2 == 0
  11. var y: uint64 # doesn't work
  12. doAssert y mod 2 == 0
  13. var z: uint32 # works
  14. doAssert z mod 2 == 0
  15. var a: int # works
  16. doAssert a mod 2 == 0