make tests green
This commit is contained in:
parent
eb03d9aafe
commit
21cbf438ce
1 changed files with 6 additions and 9 deletions
|
|
@ -1,15 +1,11 @@
|
|||
discard """
|
||||
file: "tnil.nim"
|
||||
output: '''0x1
|
||||
|
||||
nil
|
||||
|
||||
nil
|
||||
|
||||
output: '''1
|
||||
0
|
||||
0
|
||||
'''
|
||||
disabled: "windows"
|
||||
"""
|
||||
|
||||
{.experimental: "notnil".}
|
||||
type
|
||||
MyPointer = distinct pointer
|
||||
MyString = distinct string
|
||||
|
|
@ -17,7 +13,8 @@ type
|
|||
MyInt = distinct int
|
||||
|
||||
proc foo(a: MyPointer) =
|
||||
echo a.repr
|
||||
# workaround a Windows 'repr' difference:
|
||||
echo cast[int](a)
|
||||
|
||||
foo(cast[MyPointer](1))
|
||||
foo(cast[MyPointer](nil))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue