Fixed segfault in Type.ToString

This commit is contained in:
Sasha Koshka 2022-09-29 02:03:19 -04:00
parent 6c02e45e2e
commit 16fe6afdff

View File

@ -85,6 +85,11 @@ func (member TypeSectionMember) ToString (indent int, breakLine bool) (output st
} }
func (what Type) ToString () (output string) { func (what Type) ToString () (output string) {
if what.kind == TypeKindNil {
output += "NIL-TYPE"
return
}
if what.kind == TypeKindBasic { if what.kind == TypeKindBasic {
output += what.name.ToString() output += what.name.ToString()
} else { } else {