-
I wrote following code
and I got this
instead of
Just wondering what's happening here, is it by design? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
CUE is lexically scoped using blocks, which means that the reference to Depends what you are after here: https://tip.cuelang.org/play/?id=nbnzUOsJafS#cue@export@cue |
Beta Was this translation helpful? Give feedback.
-
It's more clear if I remove the |
Beta Was this translation helpful? Give feedback.
CUE is lexically scoped using blocks, which means that the reference to
a
inres: a
resolves to the top-levela : *[] | [...]
and not the one contained within the if comprehension.Depends what you are after here: https://tip.cuelang.org/play/?id=nbnzUOsJafS#cue@export@cue