mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-31 02:43:41 +00:00
This commit is contained in:
7
tests/vm/mscriptcompiletime.nim
Normal file
7
tests/vm/mscriptcompiletime.nim
Normal file
@@ -0,0 +1,7 @@
|
||||
# bug.nim
|
||||
var bar* {.compileTime.} = 1
|
||||
|
||||
proc dummy = discard
|
||||
|
||||
static:
|
||||
inc bar
|
||||
9
tests/vm/tscriptcompiletime.nims
Normal file
9
tests/vm/tscriptcompiletime.nims
Normal file
@@ -0,0 +1,9 @@
|
||||
discard """
|
||||
cmd: "nim e $file"
|
||||
"""
|
||||
|
||||
import mscriptcompiletime
|
||||
|
||||
macro foo =
|
||||
doAssert bar == 2
|
||||
foo()
|
||||
Reference in New Issue
Block a user