summary refs log tree commit diff stats
path: root/tests/generics/t7446.nim
blob: 71aa8f0e843b63a34d6b5fc250511fa7e5fef936 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
proc foo(x: Natural or SomeUnsignedInt):int = 
  when x is int:
    result = 1
  else:
    result = 2
let a = 10
doAssert foo(a) == 1

let b = 10'u8
doAssert foo(b) == 2