potential fix for semgeneric formal params (#17494)
marked locations where analysis of return formal param is done prior to args. This might fix some subtle bugs.
This commit is contained in:
parent
1590d14575
commit
7366a3da37
3 changed files with 8 additions and 2 deletions
|
|
@ -85,6 +85,9 @@ proc checkIsolate*(n: PNode): bool =
|
|||
of nkCharLit..nkNilLit:
|
||||
result = true
|
||||
of nkCallKinds:
|
||||
# XXX: as long as we don't update the analysis while examining arguments
|
||||
# we can do an early check of the return type, otherwise this is a
|
||||
# bug and needs to be moved below
|
||||
if n[0].typ.flags * {tfGcSafe, tfNoSideEffect} == {}:
|
||||
return false
|
||||
for i in 1..<n.len:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue