Files
llgo/_demo/go/issue1370_goast/goast.go
xgopilot 0ee2530c2e refactor: move issue #1370 regression tests to _demo/go
Move the three regression test cases from _demo/ to _demo/go/:
- issue1370_gotypes (go/types.Object test)
- issue1370_goast (go/ast.Expr test)
- issue1370_geometry (custom interface test)

Updated import path in geometry.go to reflect new location.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
2025-10-27 07:25:20 +00:00

26 lines
357 B
Go

package main
import (
"fmt"
"go/ast"
"go/token"
)
func main() {
ident := &ast.Ident{
NamePos: token.Pos(42),
Name: "foo",
}
var expr ast.Expr = ident
pos := expr.Pos()
fmt.Printf("Position: %d\n", pos)
if pos != 42 {
println("FAIL: Position mismatch")
return
}
println("SUCCESS: ast.Expr interface method calls work correctly")
}