mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
26 lines
312 B
Nim
26 lines
312 B
Nim
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
|