Program.Zero: support types.Signature/Chan

This commit is contained in:
xushiwei
2024-07-08 15:37:20 +08:00
parent 1d4cba9180
commit 1e39bd8336

View File

@@ -127,7 +127,7 @@ func (p Program) Zero(t Type) Expr {
default:
panic("todo")
}
case *types.Pointer:
case *types.Pointer, *types.Signature, *types.Chan:
return Expr{llvm.ConstNull(t.ll), t}
case *types.Struct:
n := u.NumFields()