Skip to content

Two variable comprehensions potentially getting lost during pruning #1080

Description

@charithe

Describe the bug

I am not quite sure whether this is a bug or not. I was reading the source to track down a different problem and came across this, which seems odd to me.

https://github.com/google/cel-go/blob/5d18e93d204801cbe02158a0ddb3a3abce29e4ed/interpreter/prune.go#L418-L433

Shouldn't it check compre.IterVar2 and return a p.NewComprehensionTwoVar(...) if it's not empty?

Similarly, shouldn't there be a check for a two variable comprehension in the following bit as well?

https://github.com/google/cel-go/blob/5d18e93d204801cbe02158a0ddb3a3abce29e4ed/interpreter/prune.go#L284-L287

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions