-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: field in super should not be interpreted with standalone-super c…
…oncept. Jsonnet spec defines special behavior for `super.field` and `field in super` expressions, while in jrsonnet it is implemented by standalone-super concept, with optimizations in case of `super.field`. However, standalone-super is conflicting with `field in super` behavior, so special handling is needed for this expression. Fixes: #153
- Loading branch information
1 parent
a7b20f9
commit d1e2f8e
Showing
3 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
local upper = { | ||
'bar': if 'baz' in super then super.baz else 'nope', | ||
}; | ||
|
||
local obj = { | ||
foo+: upper, | ||
}; | ||
|
||
obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"foo": { | ||
"bar": "nope" | ||
} | ||
} |