Files
llgo/go.mod
xgopilot 86d13a5add fix(cl): skip compiling methods for generic type definitions
Fixes #1358

The compiler was attempting to compile methods for non-instantiated generic
types (like unique.Handle[T]), which caused the SSA builder to panic with a
nil pointer dereference. This fix adds two checks:

1. In compileType: Skip generic type definitions (types with type parameters
   but no type arguments)
2. In compileMethods: Skip types containing type parameters and skip methods
   from external packages

The unique.Make demo now compiles without panicking, though it still requires
runtime support for the unique package to link successfully.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: cpunion <cpunion@users.noreply.github.com>
2025-10-17 22:15:18 +00:00

34 lines
838 B
Modula-2

module github.com/goplus/llgo
go 1.24.0
toolchain go1.24.5
require (
github.com/goplus/cobra v1.9.12 //gop:class
github.com/goplus/gogen v1.19.3
github.com/goplus/lib v0.3.0
github.com/goplus/llgo/runtime v0.0.0-00010101000000-000000000000
github.com/goplus/llvm v0.8.5
github.com/goplus/mod v0.17.1
github.com/qiniu/x v1.15.1
golang.org/x/tools v0.38.0
)
require (
github.com/marcinbor85/gohex v0.0.0-20210308104911-55fb1c624d84
github.com/mattn/go-tty v0.0.7
github.com/sigurn/crc16 v0.0.0-20240131213347-83fcde1e29d1
go.bug.st/serial v1.6.4
)
require (
github.com/creack/goselect v0.1.2 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
golang.org/x/mod v0.29.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/sys v0.37.0 // indirect
)
replace github.com/goplus/llgo/runtime => ./runtime