mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-25 12:25:08 +00:00
fixes #3584
This commit is contained in:
@@ -1635,6 +1635,7 @@ proc matchesAux(c: PContext, n, nOrig: PNode,
|
||||
if arg != nil and m.baseTypeMatch and container != nil:
|
||||
addSon(container, arg)
|
||||
incrIndexType(container.typ)
|
||||
checkConstraint(n.sons[a])
|
||||
else:
|
||||
m.state = csNoMatch
|
||||
return
|
||||
@@ -1675,7 +1676,7 @@ proc matchesAux(c: PContext, n, nOrig: PNode,
|
||||
setSon(m.call, formal.position + 1, arg)
|
||||
inc(f)
|
||||
container = nil
|
||||
checkConstraint(n.sons[a])
|
||||
checkConstraint(n.sons[a])
|
||||
inc(a)
|
||||
|
||||
proc semFinishOperands*(c: PContext, n: PNode) =
|
||||
|
||||
12
tests/js/tvarargs.nim
Normal file
12
tests/js/tvarargs.nim
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
# bug #3584
|
||||
|
||||
type
|
||||
ConsoleObj {.importc.} = object of RootObj
|
||||
log*: proc() {.nimcall varargs.}
|
||||
Console = ref ConsoleObj
|
||||
|
||||
var console* {.importc nodecl.}: Console
|
||||
|
||||
when isMainModule:
|
||||
console.log "Hello, world"
|
||||
Reference in New Issue
Block a user