From d15888d923e3f3041da95698f074f47800196f7a Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 18 Feb 2026 20:49:54 +0800 Subject: [PATCH] progress --- compiler/semtypes.nim | 3 --- tests/errmsgs/t25508.nim | 11 +++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 tests/errmsgs/t25508.nim diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 62b63eb891..8348c54c4c 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -945,9 +945,6 @@ proc semRecordNodeAux(c: PContext, n: PNode, check: var IntSet, pos: var int, n[^1] = firstRange(c.config, typ) hasDefaultField = true propagateToOwner(rectype, typ) - if typ != nil and typ.kind == tyVoid: - localError(c.config, n.info, "'void' is not allowed as a field type") - typ = errorType(c) var fieldOwner = if c.inGenericContext > 0: c.getCurrOwner else: rectype.sym for i in 0..