cl: compileValue check types.Default for const

This commit is contained in:
visualfc
2024-04-30 08:13:39 +08:00
parent 04f81f3dbb
commit a792e312db
3 changed files with 3 additions and 3 deletions

View File

@@ -135,7 +135,7 @@ func (b Builder) Const(v constant.Value, typ Type) Expr {
if v == nil {
return prog.Null(typ)
}
switch t := types.Default(typ.t).(type) {
switch t := typ.t.(type) {
case *types.Basic:
kind := t.Kind()
switch {