Don't take owner for effects

This commit is contained in:
SirOlaf
2024-03-16 19:39:00 +01:00
parent 380933dc9a
commit c4e18c79eb

View File

@@ -740,7 +740,7 @@ proc typeToString(typ: PType, prefer: TPreferedDesc = preferName): string =
addSep(prag)
prag.add("gcsafe")
if not hasImplicitRaises and prefer == preferInferredEffects and not isNil(t.owner) and not isNil(t.owner.typ) and not isNil(t.owner.typ.n) and (t.owner.typ.n.len > 0):
let effects = t.owner.typ.n[0]
let effects = t.n[0]
if effects.kind == nkEffectList and effects.len == effectListLen:
var inferredRaisesStr = ""
let effs = effects[exceptionEffects]