Files
Nim/tests/cpp/torc.nim
flywind 233c6e9fb3 fix #18410 (Errors initializing an object of RootObj with the C++ backend) [backport] (#18836)
* fix #18410

* one line comment

* typo

* typo

* cover cpp

(cherry picked from commit 2f730afe9e)
2021-11-03 15:06:31 +01:00

15 lines
191 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)"