tdefaultvalueconv.nim 213 B

1234567891011
  1. # issue #22126
  2. func foo[T](arr: openArray[T], idx: Natural = arr.high): int = # missed conversion: `Natural(arr.high)`
  3. if idx == 0:
  4. return 0
  5. foo(arr, idx - 1)
  6. let arr = [0, 1, 2]
  7. doAssert foo(arr) == 0