google / cel-go

Fast, portable, non-Turing complete expression evaluation with gradual typing (Go)
https://cel.dev
Apache License 2.0
2.31k stars 225 forks source link

Use bytes interface value for zero native type struct fields instead of dynamic list #981

Closed patrickpichler closed 3 months ago

patrickpichler commented 4 months ago

If a struct has a byte array/slice field and it happens to be the zero value, a dynamic list object was returned. This caused issues with functions taking Bytes via arguments, as the type checker will accept such functions, but they might fail at runtime.

To work around this, the raw bytes array/slice is returned in case of an zero value.

TristonianJones commented 4 months ago

/gcbrun

TristonianJones commented 4 months ago

/gcbrun

TristonianJones commented 3 months ago

/gcbrun