forked from nim-lang/Nim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix nim-lang#18410 (Errors initializing an object of RootObj with the…
… C++ backend) [backport] (nim-lang#18836) * fix nim-lang#18410 * one line comment * typo * typo * cover cpp
- Loading branch information
Showing
3 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
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)" |