mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-23 15:11:40 +00:00
Update compiler/semtypes.nim
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -568,7 +568,7 @@ proc semTuple(c: PContext, n: PNode, prev: PType): PType =
|
||||
else:
|
||||
localError(c.config, a.info, errTypeExpected)
|
||||
typ = errorType(c)
|
||||
if typ != nil and typ.kind == tyVoid:
|
||||
if typ != nil and skipTypes(typ, {tyGenericInst, tyAlias, tySink}).kind == tyVoid:
|
||||
localError(c.config, a.info, "'void' is not allowed as a field type")
|
||||
typ = errorType(c)
|
||||
for j in 0..<a.len - 2:
|
||||
|
||||
Reference in New Issue
Block a user