commit
be534279da
2 changed files with 15 additions and 1 deletions
|
|
@ -625,7 +625,7 @@ proc factImplies(fact, prop: PNode): TImplication =
|
|||
# == not a or not b == not (a and b)
|
||||
let arg = fact.sons[1]
|
||||
case arg.getMagic
|
||||
of mIsNil:
|
||||
of mIsNil, mEqRef:
|
||||
return ~factImplies(arg, prop)
|
||||
of mAnd:
|
||||
# not (a and b) means not a or not b:
|
||||
|
|
|
|||
14
tests/notnil/tnotnil4.nim
Normal file
14
tests/notnil/tnotnil4.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
discard ""
|
||||
type
|
||||
TObj = ref object
|
||||
|
||||
proc check(a: TObj not nil) =
|
||||
echo repr(a)
|
||||
|
||||
proc doit() =
|
||||
var x : array[0..1, TObj]
|
||||
|
||||
if x[0] != nil:
|
||||
check(x[0])
|
||||
|
||||
doit()
|
||||
Loading…
Add table
Add a link
Reference in a new issue