make tests green again
This commit is contained in:
parent
a0cde8cee6
commit
f91a181f58
8 changed files with 18 additions and 55 deletions
|
|
@ -9,7 +9,6 @@ discard """
|
|||
type
|
||||
MyPointer = distinct pointer
|
||||
MyString = distinct string
|
||||
MyStringNotNil = distinct (string not nil)
|
||||
MyInt = distinct int
|
||||
|
||||
proc foo(a: MyPointer) =
|
||||
|
|
@ -26,20 +25,6 @@ p = cast[MyPointer](nil)
|
|||
p = nil.MyPointer
|
||||
p = nil
|
||||
|
||||
var c: MyString
|
||||
c = "Test".MyString
|
||||
c = nil.MyString
|
||||
c = nil
|
||||
|
||||
p = nil
|
||||
doAssert(compiles(c = p) == false)
|
||||
|
||||
var n: MyStringNotNil = "Test".MyStringNotNil # Cannot prove warning ...
|
||||
n = "Test".MyStringNotNil
|
||||
doAssert(compiles(n = nil.MyStringNotNil) == false)
|
||||
doAssert(compiles(n = nil.MyStringNotNil) == false)
|
||||
doAssert(compiles(n = nil) == false)
|
||||
|
||||
var i: MyInt
|
||||
i = 1.MyInt
|
||||
doAssert(compiles(i = nil) == false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue