fixes #23306 nim cpp -r invalid code generation regression with closure iterators and try/catch-like constructions (#23317)

This commit is contained in:
Juan M Gómez
2024-02-26 10:21:03 +00:00
committed by GitHub
parent 14cdcc091f
commit 93a8b85a91
2 changed files with 14 additions and 2 deletions

12
tests/cpp/t23306.nim Normal file
View 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)