From 9db8d2a75b184a25beb2f50e760b4554ac4e92d6 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 18 Feb 2026 21:09:25 +0800 Subject: [PATCH] Update compiler/semtypes.nim Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- compiler/semtypes.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 8348c54c4c..a7bae6674d 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -528,7 +528,7 @@ proc semAnonTuple(c: PContext, n: PNode, prev: PType): PType = result = newOrPrevType(tyTuple, prev, c) for it in n: let t = semTypeNode(c, it, nil) - if t != nil and t.kind == tyVoid: + if t != nil and t.skipTypes({tyGenericInst, tyAlias, tySink}).kind == tyVoid: localError(c.config, it.info, "'void' is not allowed as a field type") else: addSonSkipIntLitChecked(c, result, t, it, c.idgen)