You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this VRL program fails in compiling because of type of .new. (VRL Playground Link)
Error Log
error[E642]: parent path segment rejects this mutation
┌─ :5:6
│
5 │ .new.test2 = "test2"
│ ---- ^^^^^ querying a field of a non-object type is unsupported
│ │
│ this path resolves to a value of type undefined
│
= try: change parent value to object, before assignment
=
= .new = {}
= .new.test2 = "test2"
=
= see documentation about error handling at https://errors.vrl.dev/#handling
= see language documentation at https://vrl.dev
= try your code in the VRL REPL, learn more at https://vrl.dev/examples
However, if it's inside an if statement instead of for_each, this vrl program can be compiled.
body = del(.)
if is_boolean(body.message) {
., err = set(., ["new", "test1"], "test1")
}
.new.test2 = "test2"
this VRL program fails in compiling because of type of
.new
. (VRL Playground Link)Error Log
However, if it's inside an if statement instead of for_each, this vrl program can be compiled.
VRL Playground link
My theory is that
.
's type is not changed by the for_each statement, which looks like a bug.The text was updated successfully, but these errors were encountered: