tint64litgen.nim 474 B

12345678910111213141516171819202122232425262728293031
  1. discard """
  2. matrix: "--jsbigint64:on; --jsbigint64:off"
  3. """
  4. block: # issue #24233
  5. proc foo[T: SomeInteger](a, b: T) =
  6. let x = a div b
  7. const bar = 123
  8. let x: int64 = 456
  9. foo(x, bar)
  10. block: # issue #24233, modified
  11. proc f(a, b: int64) =
  12. let x = a div b
  13. proc foo[T: SomeInteger](a, b: T) =
  14. f(a, b)
  15. const bar = 123
  16. let x: int64 = 456
  17. foo(x, bar)
  18. block:
  19. proc foo[I: Ordinal](x: I) = discard
  20. foo(123)
  21. let x = [0, 1, 2]
  22. discard x[0]