From c4e18c79eb996c2afa4b20bca56374872d291c61 Mon Sep 17 00:00:00 2001 From: SirOlaf <.> Date: Sat, 16 Mar 2024 19:39:00 +0100 Subject: [PATCH] Don't take owner for effects --- compiler/types.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/types.nim b/compiler/types.nim index 3726378273..d9e572cd54 100644 --- a/compiler/types.nim +++ b/compiler/types.nim @@ -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]