compiler/cl: fix named slice type

This commit is contained in:
visualfc
2025-02-03 20:13:57 +08:00
parent e5ff33fcc6
commit 5727761551
3 changed files with 163 additions and 0 deletions

View File

@@ -691,6 +691,7 @@ func (p *context) compileInstrOrValue(b llssa.Builder, iv instrOrValue, asValue
max = p.compileValue(b, v.Max)
}
ret = b.Slice(x, low, high, max)
ret.Type = b.Prog.Type(v.Type(), llssa.InGo)
case *ssa.MakeInterface:
if refs := *v.Referrers(); len(refs) == 1 {
switch ref := refs[0].(type) {