goTypes.cvtFunc fix: remove sig.Variadic flag
This commit is contained in:
@@ -239,7 +239,7 @@ func (p *context) compileFuncDecl(pkg llssa.Package, f *ssa.Function, call bool)
|
||||
sig = llssa.FuncAddCtx(ctx, sig)
|
||||
} else {
|
||||
if debugInstr {
|
||||
log.Println("==> NewFunc", name, "type:", sig.Recv(), sig)
|
||||
log.Println("==> NewFunc", name, "type:", sig.Recv(), sig, "ftype:", ftype)
|
||||
}
|
||||
}
|
||||
if fn == nil {
|
||||
|
||||
@@ -172,7 +172,7 @@ func (p goTypes) cvtFunc(sig *types.Signature, recv *types.Var) (raw *types.Sign
|
||||
}
|
||||
params, cvt1 := p.cvtTuple(sig.Params())
|
||||
results, cvt2 := p.cvtTuple(sig.Results())
|
||||
if cvt1 || cvt2 {
|
||||
if cvt1 || cvt2 || sig.Variadic() {
|
||||
// variadic always is false in raw type for Go function
|
||||
return types.NewSignatureType(nil, nil, nil, params, results, false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user