From 0b0d202c499935e6682632a876f5e8376f8623c3 Mon Sep 17 00:00:00 2001 From: Wolfgang Johannes Kohnen Date: Fri, 27 May 2016 13:44:17 +0000 Subject: [PATCH] runtime/Go semantic context: NewAND, NewOR create empty operands --- runtime/Go/antlr/semantic_context.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/Go/antlr/semantic_context.go b/runtime/Go/antlr/semantic_context.go index 498c8553c..6e0c52b4b 100644 --- a/runtime/Go/antlr/semantic_context.go +++ b/runtime/Go/antlr/semantic_context.go @@ -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 {