Fixed isSingular
This commit is contained in:
parent
7581541ff5
commit
1924892ab6
@ -232,6 +232,8 @@ func (analyzer *AnalysisOperation) typeCheck (
|
|||||||
return
|
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) {
|
func doIndent (indent int, input ...any) (output string) {
|
||||||
for index := 0; index < indent; index ++ {
|
for index := 0; index < indent; index ++ {
|
||||||
output += "\t"
|
output += "\t"
|
||||||
|
@ -127,6 +127,11 @@ func (what Type) isSingular () (singular bool) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if what.length > 0 {
|
||||||
|
singular = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// decide whether or not to recurse
|
// decide whether or not to recurse
|
||||||
if what.kind != TypeKindBasic { return }
|
if what.kind != TypeKindBasic { return }
|
||||||
actual := what.actual
|
actual := what.actual
|
||||||
|
Reference in New Issue
Block a user