What version of CUE are you using (cue version)?
0.16.1
Does this issue reproduce with the latest stable release?
yes
What did you do?
@experiment(try)
({
outer?: {
opt?: {}
}
inner: {
try {
opt: outer?.opt? & {
try {}
}
}
}
}).inner
https://cuelang.org/play/?id=076Hu4eoYC6#w=function&i=cue&f=export&o=yaml
What did you expect to see?
{}
What did you see instead?
opt: cannot reference optional field: outer:
-:9:9
Observations
It works as expected if we delete inner try block or use opt: outer? & instead opt: outer?.opt? &
What version of CUE are you using (
cue version)?0.16.1
Does this issue reproduce with the latest stable release?
yes
What did you do?
https://cuelang.org/play/?id=076Hu4eoYC6#w=function&i=cue&f=export&o=yaml
What did you expect to see?
{}What did you see instead?
Observations
It works as expected if we delete inner try block or use
opt: outer? &insteadopt: outer?.opt? &