From c1da220a99de3bb6ae668b88d55f055b1594ba75 Mon Sep 17 00:00:00 2001 From: Li Jie Date: Sun, 19 Jan 2025 19:02:58 +0800 Subject: [PATCH] ssa: toType(ssa.TypeParam) --- compiler/ssa/type.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/ssa/type.go b/compiler/ssa/type.go index a6db12f9..c7a99ac1 100644 --- a/compiler/ssa/type.go +++ b/compiler/ssa/type.go @@ -391,6 +391,8 @@ func (p Program) toType(raw types.Type) Type { return &aType{llvm.PointerType(p.rtChan(), 0), typ, vkChan} case *types.Alias: return p.toType(types.Unalias(t)) + case *types.TypeParam: + return p.toType(t.Constraint()) } panic(fmt.Sprintf("toLLVMType: todo - %T\n", raw)) }