diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2021-01-11 08:07:48 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-11 15:07:48 +0100 |
commit | aa185c0e9b4904b305496bd1f83cbbadf2fbfa36 (patch) | |
tree | 3ecb497224682212ace87949baa650f359a806db /tests/distinct/tdistinct_issues.nim | |
parent | be6e8916faa51d227d51e1291d1f24751385b010 (diff) | |
download | Nim-aa185c0e9b4904b305496bd1f83cbbadf2fbfa36.tar.gz |
fix #13517 (#16681)
Diffstat (limited to 'tests/distinct/tdistinct_issues.nim')
-rw-r--r-- | tests/distinct/tdistinct_issues.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/distinct/tdistinct_issues.nim b/tests/distinct/tdistinct_issues.nim index ce71344d0..747cf0b8d 100644 --- a/tests/distinct/tdistinct_issues.nim +++ b/tests/distinct/tdistinct_issues.nim @@ -65,3 +65,17 @@ block t9322: proc mystr(s: string) = echo s mystr($Fix("apr")) + + +block: # bug #13517 + type MyUint64 = distinct uint64 + + proc `==`(a: MyUint64, b: uint64): bool = uint64(a) == b + + block: + doAssert MyUint64.high is MyUint64 + doAssert MyUint64.high == 18446744073709551615'u64 + + static: + doAssert MyUint64.high is MyUint64 + doAssert MyUint64.high == 18446744073709551615'u64 |