runtime/Go semantic context: NewAND, NewOR create empty operands

This commit is contained in:
Wolfgang Johannes Kohnen 2016-05-27 13:44:17 +00:00
parent 128ec07dd3
commit 0b0d202c49
1 changed files with 4 additions and 4 deletions

View File

@ -209,7 +209,7 @@ func NewAND(a, b SemanticContext) *AND {
vs := operands.values()
opnds := make([]SemanticContext, len(vs))
for i, v := range vs {
vs[i] = v.(SemanticContext)
opnds[i] = v.(SemanticContext)
}
and := new(AND)
@ -295,7 +295,7 @@ func (a *AND) String() string {
var s = ""
for _, o := range a.opnds {
s += "&& " + o.String()
s += "&& " + fmt.Sprint(o)
}
if len(s) > 3 {
@ -350,7 +350,7 @@ func NewOR(a, b SemanticContext) *OR {
opnds := make([]SemanticContext, len(vs))
for i, v := range vs {
vs[i] = v.(SemanticContext)
opnds[i] = v.(SemanticContext)
}
o := new(OR)
@ -430,7 +430,7 @@ func (o *OR) String() string {
var s = ""
for _, o := range o.opnds {
s += "|| " + o.String()
s += "|| " + fmt.Sprint(o)
}
if len(s) > 3 {