make tests green

This commit is contained in:
Araq
2018-05-02 10:51:55 +02:00
parent eb03d9aafe
commit 21cbf438ce

View File

@@ -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))