Commit Graph

3 Commits

Author SHA1 Message Date
xgopilot
902ac3b35a test(demo): restructure issue #1370 regression tests to match maphash style
- Remove temporary .tmp-comment/ and .tmp-images/ directories
- Remove llgo binary from repository
- Refactor _demo/go/issue1370_case1 to include multiple test functions with proper validation
- Refactor _demo/go/issue1370_case2 to include multiple test functions with proper validation
- Tests now panic on failure with descriptive error messages
- Follow the same test structure as _demo/go/maphash

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 13:41:40 +00:00
xgopilot
b62dafbc3a fix(ssa): use abi.PathOf() for correct package path in interface metadata
Fixes os.ReadDir segfault caused by package path mismatch between llgo
overlay packages and canonical standard library paths.

The issue occurred in: os.ReadDir → sort.Slice → reflectlite.Swapper
where internal/reflectlite.Type interface has private methods common()
and uncommon(). Using mPkg.Path() returned the overlay path
'github.com/goplus/llgo/runtime/internal/lib/internal/reflectlite'
instead of the canonical 'internal/reflectlite', causing runtime to
only fill public methods and leave private method pointers NULL.

Changed to use abi.PathOf() which returns the correct canonical package
path for matching, ensuring all interface methods (both public and
private) are properly filled in the interface table.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 11:32:38 +00:00
xgopilot
89e483b8ec test(demo): add regression demos for issue #1370 cases
- case1: go/types.Object with Scope.Insert() calling private setParent()
- case2: go/ast.Expr interface conversion with private exprNode()

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