fixes #6555
This commit is contained in:
parent
a6226d9452
commit
df13b2a892
2 changed files with 13 additions and 1 deletions
|
|
@ -518,6 +518,7 @@ proc notNilCheck(tracked: PEffects, n: PNode, paramType: PType) =
|
||||||
procVarcheck skipConvAndClosure(n)
|
procVarcheck skipConvAndClosure(n)
|
||||||
#elif n.kind in nkSymChoices:
|
#elif n.kind in nkSymChoices:
|
||||||
# echo "came here"
|
# echo "came here"
|
||||||
|
let paramType = paramType.skipTypesOrNil(abstractInst)
|
||||||
if paramType != nil and tfNotNil in paramType.flags and
|
if paramType != nil and tfNotNil in paramType.flags and
|
||||||
n.typ != nil and tfNotNil notin n.typ.flags:
|
n.typ != nil and tfNotNil notin n.typ.flags:
|
||||||
if n.kind == nkAddr:
|
if n.kind == nkAddr:
|
||||||
|
|
|
||||||
|
|
@ -23,4 +23,15 @@ var b = Obj() # this doesn't (also doesn't works with additional fields)
|
||||||
|
|
||||||
var z = Obj2[int]()
|
var z = Obj2[int]()
|
||||||
|
|
||||||
echo "success"
|
echo "success"
|
||||||
|
|
||||||
|
# bug #6555
|
||||||
|
|
||||||
|
import tables
|
||||||
|
|
||||||
|
type
|
||||||
|
TaskOrNil = ref object
|
||||||
|
Task = TaskOrNil not nil
|
||||||
|
|
||||||
|
let table = newTable[string, Task]()
|
||||||
|
table.del("task")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue