mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-23 15:11:40 +00:00
progress
This commit is contained in:
@@ -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..<n.len-2:
|
||||
|
||||
11
tests/errmsgs/t25508.nim
Normal file
11
tests/errmsgs/t25508.nim
Normal file
@@ -0,0 +1,11 @@
|
||||
discard """
|
||||
cmd: "nim check --hints:off $file"
|
||||
action: "reject"
|
||||
nimout: '''
|
||||
t25508.nim(10, 23) Error: 'void' is not allowed as a field type
|
||||
t25508.nim(11, 18) Error: 'void' is not allowed as a field type
|
||||
'''
|
||||
"""
|
||||
|
||||
discard default(tuple[b: void])
|
||||
discard default((void,))
|
||||
Reference in New Issue
Block a user