We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
super
1 parent 1c51f11 commit 55bcb26Copy full SHA for 55bcb26
1 file changed
sjsonnet/test/src/sjsonnet/EvaluatorTests.scala
@@ -194,6 +194,21 @@ object EvaluatorTests extends TestSuite {
194
|""".stripMargin,
195
useNewEvaluator = useNewEvaluator
196
) ==> ujson.Obj("x" -> ujson.Num(3))
197
+ // Yet another related bug involving super references _not_ in locals:
198
+ eval(
199
+ """
200
+ |local lib = {
201
+ | foo():: {
202
+ | [k]: super.x + 1
203
+ | for k in ["x"]
204
+ | },
205
+ |};
206
+ |
207
+ |{ x: 2 }
208
+ |+ lib.foo()
209
+ |""".stripMargin,
210
+ useNewEvaluator = useNewEvaluator
211
+ ) ==> ujson.Obj("x" -> ujson.Num(3))
212
// Regression test for a bug in handling of non-string field names:
213
evalErr("{[k]: k for k in [1]}", useNewEvaluator = useNewEvaluator) ==>
214
"""sjsonnet.Error: Field name must be string or null, not number
0 commit comments