mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
* fixes regression #17121; adding doc comment in importc proc makes it silently noop at CT * Update compiler/vmgen.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
9
tests/vm/t17121.nim
Normal file
9
tests/vm/t17121.nim
Normal file
@@ -0,0 +1,9 @@
|
||||
discard """
|
||||
errormsg: "cannot 'importc' variable at compile time; c_printf"
|
||||
"""
|
||||
|
||||
proc c_printf*(frmt: cstring): cint {.importc: "printf", header: "<stdio.h>", varargs, discardable.} =
|
||||
## foo bar
|
||||
runnableExamples: discard
|
||||
static:
|
||||
let a = c_printf("abc\n")
|
||||
Reference in New Issue
Block a user