haskell-jsonnet icon indicating copy to clipboard operation
haskell-jsonnet copied to clipboard

Evaluating `expr in super` fails when there is no super class

Open moleike opened this issue 4 years ago • 0 comments

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 avatar Mar 09 '21 03:03 moleike