mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-13 14:53:46 +00:00
@@ -1931,6 +1931,8 @@ proc semYieldVarResult(c: PContext, n: PNode, restype: PType) =
|
||||
tupleConstr[i] = takeImplicitAddr(c, tupleConstr[i], e.kind == tyLent)
|
||||
else:
|
||||
localError(c.config, n[0].info, errXExpected, "tuple constructor")
|
||||
elif e.kind == tyEmpty:
|
||||
localError(c.config, n[0].info, errTypeExpected)
|
||||
else:
|
||||
when false:
|
||||
# XXX investigate what we really need here.
|
||||
|
||||
13
tests/misc/t21109.nim
Normal file
13
tests/misc/t21109.nim
Normal file
@@ -0,0 +1,13 @@
|
||||
discard """
|
||||
action: reject
|
||||
errormsg: "type expected"
|
||||
file: "iterators.nim"
|
||||
"""
|
||||
|
||||
|
||||
template b(j: untyped) = j
|
||||
template m() = discard
|
||||
|
||||
b:
|
||||
for t, f in @[]:
|
||||
m()
|
||||
Reference in New Issue
Block a user