fix: implement variadic using a type category to avoid corruption

This commit is contained in:
Marc Vertes
2019-09-10 13:12:03 +02:00
committed by Traefiker Bot
parent 2f0279f0f5
commit 82dd3f2953
4 changed files with 24 additions and 15 deletions

View File

@@ -614,7 +614,7 @@ func call(n *node) {
if c.kind == basicLit {
var argType reflect.Type
if variadic >= 0 && i >= variadic {
argType = n.child[0].typ.arg[variadic].TypeOf()
argType = n.child[0].typ.arg[variadic].val.TypeOf()
} else {
argType = n.child[0].typ.arg[i].TypeOf()
}