TestCFuncPtr

This commit is contained in:
xushiwei
2024-05-03 17:08:44 +08:00
parent 8eeac8a26d
commit 29fad7b397
3 changed files with 25 additions and 3 deletions

View File

@@ -30,6 +30,15 @@ func TestMakeInterface(t *testing.T) {
}
*/
func TestCFuncPtr(t *testing.T) {
sig := types.NewSignatureType(nil, nil, nil, nil, nil, false)
csig := (*CFuncPtr)(sig)
_ = csig.String()
if csig.Underlying() != sig {
t.Fatal("TestCFuncPtr failed")
}
}
func TestUserdefExpr(t *testing.T) {
a := delayExprTy(nil)
b := &phisExprTy{}