Fixed isSingular

This commit is contained in:
Sasha Koshka 2022-10-11 23:51:55 -04:00
parent 7581541ff5
commit 1924892ab6
2 changed files with 7 additions and 0 deletions

View File

@ -232,6 +232,8 @@ func (analyzer *AnalysisOperation) typeCheck (
return
}
// doIndent perfroms a fmt.Sprint operation on input, indenting the string. This
// does not add a trailing newline.
func doIndent (indent int, input ...any) (output string) {
for index := 0; index < indent; index ++ {
output += "\t"

View File

@ -127,6 +127,11 @@ func (what Type) isSingular () (singular bool) {
return
}
if what.length > 0 {
singular = true
return
}
// decide whether or not to recurse
if what.kind != TypeKindBasic { return }
actual := what.actual