mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
fixes #23306 nim cpp -r invalid code generation regression with closure iterators and try/catch-like constructions (#23317)
This commit is contained in:
12
tests/cpp/t23306.nim
Normal file
12
tests/cpp/t23306.nim
Normal file
@@ -0,0 +1,12 @@
|
||||
discard """
|
||||
targets: "cpp"
|
||||
"""
|
||||
|
||||
type K = object
|
||||
h: iterator(f: K): K
|
||||
|
||||
iterator d(g: K): K {.closure.} =
|
||||
defer:
|
||||
discard
|
||||
|
||||
discard K(h: d)
|
||||
Reference in New Issue
Block a user