File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,15 @@ func (*inArray) Exit(node *Node) {
44
44
switch n := (* node ).(type ) {
45
45
case * BinaryNode :
46
46
if n .Operator == "in" || n .Operator == "not in" {
47
- t := n .Left .GetType ()
48
- if t == nil || n .Left .GetType ().Kind () != reflect .Int {
49
- // This optimization can be only performed if left side is int type,
50
- // as runtime.in func uses reflect.Map.MapIndex and keys of map must,
51
- // be same as checked value type.
52
- return
53
- }
54
47
if array , ok := n .Right .(* ArrayNode ); ok {
55
48
if len (array .Nodes ) > 0 {
49
+ t := n .Left .GetType ()
50
+ if t == nil || t .Kind () != reflect .Int {
51
+ // This optimization can be only performed if left side is int type,
52
+ // as runtime.in func uses reflect.Map.MapIndex and keys of map must,
53
+ // be same as checked value type.
54
+ goto string
55
+ }
56
56
57
57
for _ , a := range array .Nodes {
58
58
if _ , ok := a .(* IntegerNode ); ! ok {
You can’t perform that action at this time.
0 commit comments