summary refs log tree commit diff stats
path: root/tests/cpp/torc.nim
blob: 636105f31afa4e83077e92710b79346ada6545c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
discard """
  targets: "cpp"
  matrix: "--gc:orc"
"""

import std/options

# bug #18410
type
  O = object of RootObj
   val: pointer

proc p(): Option[O] = none(O)

doAssert $p() == "none(O)"

# bug #17351
type
  Foo = object of RootObj
  Foo2 = object of Foo
  Bar = object
    x: Foo2

var b = Bar()
discard b