cl: funcName check $bound

This commit is contained in:
visualfc
2025-05-15 21:01:56 +08:00
parent 93b9b7d44c
commit c4f0dd124d
6 changed files with 157 additions and 11 deletions

View File

@@ -0,0 +1,25 @@
package main
func main() {
se := demo1{}
f := se.encode
if f() != 1 {
panic("error")
}
}
var my = demo2{}.encode
type demo1 struct {
}
func (se demo1) encode() int {
return 1
}
type demo2 struct {
}
func (se demo2) encode() int {
return 2
}