-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3651 from jangko/vm_'excl'
fixed compile time `excl ` cause SIGSEGV #3639
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
discard """ | ||
output: '''false''' | ||
""" | ||
|
||
import macros | ||
|
||
type | ||
nlOptions = enum | ||
nloNone | ||
nloDebug | ||
|
||
var nlOpts {.compileTime.} = {nloDebug} | ||
|
||
proc initOpts(): set[nlOptions] = | ||
result.incl nloDebug | ||
result.incl nloNone | ||
result.excl nloDebug | ||
|
||
const cOpts = initOpts() | ||
|
||
macro nlo(): stmt = | ||
nlOpts.incl(nloNone) | ||
nlOpts.excl(nloDebug) | ||
result = newEmptyNode() | ||
|
||
nlo() | ||
echo nloDebug in cOpts |