TestAny, TestDelayExpr

This commit is contained in:
xushiwei
2024-04-27 21:32:48 +08:00
parent 08da38a609
commit d432899b42
4 changed files with 42 additions and 24 deletions

View File

@@ -418,9 +418,6 @@ func (p *context) compileVArg(ret []llssa.Expr, b llssa.Builder, v ssa.Value) []
switch v := v.(type) {
case *ssa.Slice: // varargs: this is a varargs slice
if args, ok := p.isVArgs(v.X); ok {
for i, arg := range args {
args[i] = arg.Do(true)
}
return append(ret, args...)
}
case *ssa.Const:
@@ -435,7 +432,7 @@ func (p *context) compileValues(b llssa.Builder, vals []ssa.Value, hasVArg int)
n := len(vals) - hasVArg
ret := make([]llssa.Expr, n)
for i := 0; i < n; i++ {
ret[i] = p.compileValue(b, vals[i]).Do(false)
ret[i] = p.compileValue(b, vals[i]).Do()
}
if hasVArg > 0 {
ret = p.compileVArg(ret, b, vals[n])