TypeAssert refactor

This commit is contained in:
xushiwei
2024-05-23 01:34:48 +08:00
parent a4c4324ba3
commit 4986592dd7
4 changed files with 15 additions and 16 deletions

View File

@@ -425,7 +425,7 @@ func (b Builder) UnOp(op token.Token, x Expr) (ret Expr) {
case token.MUL:
return b.Load(x)
case token.SUB:
switch t := x.Type.raw.Underlying().(type) {
switch t := x.raw.Type.Underlying().(type) {
case *types.Basic:
ret.Type = x.Type
if t.Info()&types.IsInteger != 0 {