Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VRL error message for field assignment to non-object has a one-off typo in it #1154

Open
bruceg opened this issue Nov 30, 2024 · 0 comments
Open
Labels
type: bug A code related bug vrl: diagnostic Changes to the REPL

Comments

@bruceg
Copy link
Member

bruceg commented Nov 30, 2024

Given the VRL code:

foo = {}
foo.bar.baz = 12

the error message suggestions are missing the leading .:

error[E642]: parent path segment rejects this mutation
  ┌─ :2:9
  │
2 │ foo.bar.baz = 12
  │ ------- ^^^ 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
  =
  =     foobar = {}
  =     foobar.baz = 12
@bruceg bruceg added the type: bug A code related bug label Nov 30, 2024
@jszwedko jszwedko added the vrl: diagnostic Changes to the REPL label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A code related bug vrl: diagnostic Changes to the REPL
Projects
None yet
Development

No branches or pull requests

2 participants