Raise built-in ident capacity from 96 to 768

This commit is contained in:
Nigel Tao committed 2018-05-05 09:23:10 +10:00
1 parent 1702c1e303
commit e8eeee371a
8 files changed
+129 -105

No files matched your search

+2 -2
View File
@@ -846,7 +846,7 @@ func (q *checker) tcheckExprBinaryOp(n *a.Expr, depth uint32) error {
n.SetConstValue(ncv)
}
if comparisonOps[0xFF&op] {
if (op < t.ID(len(comparisonOps))) && comparisonOps[op] {
n.SetMType(typeExprBool)
} else if !lTyp.IsIdeal() {
n.SetMType(lTyp.Unrefined())
@@ -1036,7 +1036,7 @@ swtch:
return nil
}
var comparisonOps = [256]bool{
var comparisonOps = [...]bool{
t.IDXBinaryNotEq: true,
t.IDXBinaryLessThan: true,
t.IDXBinaryLessEq: true,