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

Evaluating expr in super fails when there is no super class #18

Open
moleike opened this issue Mar 9, 2021 · 0 comments
Open

Evaluating expr in super fails when there is no super class #18

moleike opened this issue Mar 9, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@moleike
Copy link
Owner

moleike commented Mar 9, 2021

This is expected given we are treating super as a variable, while Jsonnet core AST super is just another literal.

C++ impl. returns the following:

{ foo: "bar", bar: super.foo }

RUNTIME ERROR: attempt to use super when there is no super class.

While:

{ foo: "bar", bar: "foo" in super }

outputs:

{
  "bar": false,
  "foo": "bar"
}

The following test fails due to this:

std.assertEqual({ f+: 3 }, { f: 3 }) 
@moleike moleike changed the title expr in super fails when there is no super class Evaluating expr in super fails when there is no super class Mar 9, 2021
@moleike moleike added the bug Something isn't working label Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant