Skip to content

Commit

Permalink
Bug: transitive field CEL expressions fail to resolve types during ty…
Browse files Browse the repository at this point in the history
…pe checking (#51)
  • Loading branch information
rodaine authored Sep 16, 2023
1 parent a36b096 commit bfb9d45
Show file tree
Hide file tree
Showing 4 changed files with 233 additions and 138 deletions.
2 changes: 1 addition & 1 deletion internal/evaluator/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func (bldr *Builder) processFieldExpressions(
var opts []cel.EnvOption
if fieldDesc.Kind() == protoreflect.MessageKind {
opts = []cel.EnvOption{
cel.TypeDescs(fieldDesc.ParentFile()),
cel.TypeDescs(fieldDesc.Message().ParentFile()),
cel.Variable("this", cel.ObjectType(string(fieldDesc.Message().FullName()))),
}
} else {
Expand Down
Loading

0 comments on commit bfb9d45

Please sign in to comment.