cvtCType bugfix

This commit is contained in:
xushiwei
2024-05-03 17:03:12 +08:00
parent 133d41d748
commit 8eeac8a26d
2 changed files with 9 additions and 2 deletions

View File

@@ -16,7 +16,9 @@
package ssa
import "go/types"
import (
"go/types"
)
// -----------------------------------------------------------------------------
@@ -72,6 +74,10 @@ func cvtCType(typ types.Type) (types.Type, bool) {
}
case *types.Struct:
return cvtCStruct(t)
case *types.Named:
if _, cvt := cvtCType(t.Underlying()); cvt {
panic("todo: named type")
}
case *types.Signature:
t = CFuncDecl(t)
return (*CFuncPtr)(t), true