summary refs log tree commit diff stats
path: root/tests/cpp/t23306.nim
blob: ebb4edb8d9a5443675ed5a9735368feb5d1b2e16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
discard """
targets: "cpp"
"""

type K = object
  h: iterator(f: K): K

iterator d(g: K): K {.closure.} =
  defer:
    discard

discard K(h: d)