Skip to content

Commit 43aebf5

Browse files
author
Randall C. O'Reilly
committed
prevent crash in symbols with errant go.mod downloads
1 parent 84597d2 commit 43aebf5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bind/symbols.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,9 @@ func (sym *symtab) addType(obj types.Object, t types.Type) error {
829829

830830
case *types.Basic:
831831
styp := sym.symtype(st)
832+
if styp == nil {
833+
return fmt.Errorf("gopy: type not found: %s\n", n)
834+
}
832835
py2go := sym.typeGoName(t)
833836
py2goParEx := ""
834837
if styp.py2go != "" {

0 commit comments

Comments
 (0)