this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

internal/core/adt: missed missing missing

Causing the try test to be incorrect.

Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: Ib441d5b069fedc4122f8477c42d6c312deb314fa
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1232048
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>

+125 -10
+125 -10
cue/testdata/comprehensions/else.txtar
··· 68 68 try x = a? try y = b? { result: x + y } fallback { default: 0 } 69 69 } 70 70 71 + missing?: int 72 + 71 73 // try-try-fallback: first fails - fallback yields 72 74 tryTryFirstFails: { 73 75 b: 2 ··· 169 171 170 172 NumCloseIDs: 2 171 173 -- out/evalalpha -- 172 - tryTryFirstFails: reference "missing" not found: 173 - ./in.cue:73:10 174 - tryTrySecondFails.try[]: reference "missing" not found: 175 - ./in.cue:79:21 174 + (struct){ 175 + ifTrue: (struct){ 176 + a: (int){ 1 } 177 + } 178 + ifFalse: (struct){ 179 + b: (int){ 2 } 180 + } 181 + forNonEmpty: (struct){ 182 + "1": (int){ 1 } 183 + "2": (int){ 2 } 184 + } 185 + forEmpty: (struct){ 186 + empty: (bool){ true } 187 + } 188 + forFilteredAll: (struct){ 189 + empty: (bool){ true } 190 + } 191 + forFilteredSome: (struct){ 192 + "2": (int){ 2 } 193 + "3": (int){ 3 } 194 + } 195 + ifTrueForEmpty: (struct){ 196 + empty: (bool){ true } 197 + } 198 + ifFalseForNonEmpty: (struct){ 199 + empty: (bool){ true } 200 + } 201 + ifTrueForNonEmpty: (struct){ 202 + "1": (int){ 1 } 203 + "2": (int){ 2 } 204 + } 205 + ifIfBothTrue: (struct){ 206 + a: (int){ 1 } 207 + } 208 + ifIfFirstFalse: (struct){ 209 + b: (int){ 2 } 210 + } 211 + ifIfSecondFalse: (struct){ 212 + b: (int){ 2 } 213 + } 214 + tryTryBothSucceed: (struct){ 215 + a: (int){ 1 } 216 + b: (int){ 2 } 217 + result: (int){ 3 } 218 + } 219 + missing?: (int){ int } 220 + tryTryFirstFails: (struct){ 221 + b: (int){ 2 } 222 + default: (int){ -1 } 223 + } 224 + tryTrySecondFails: (struct){ 225 + a: (int){ 1 } 226 + default: (int){ -2 } 227 + } 228 + listIfTrue: (#list){ 229 + 0: (int){ 1 } 230 + } 231 + listIfFalse: (#list){ 232 + 0: (int){ 2 } 233 + } 234 + listForEmpty: (#list){ 235 + 0: (int){ 0 } 236 + } 237 + listForNonEmpty: (#list){ 238 + 0: (int){ 2 } 239 + 1: (int){ 4 } 240 + } 241 + elseMultipleFields: (struct){ 242 + b: (int){ 2 } 243 + c: (int){ 3 } 244 + } 245 + elseEmbeds: (struct){ 246 + existing: (int){ 1 } 247 + fallback: (int){ 3 } 248 + } 249 + outerScope: (struct){ 250 + let threshold#1 = (int){ 10 } 251 + fallbackField: (int){ 10 } 252 + } 253 + ifNestedBody: (struct){ 254 + c: (int){ 2 } 255 + } 256 + ifNestedElse: (struct){ 257 + b: (struct){ 258 + c: (int){ 2 } 259 + } 260 + } 261 + ifNestedBoth: (struct){ 262 + c: (struct){ 263 + d: (int){ 2 } 264 + } 265 + } 266 + ifDeeplyNested: (struct){ 267 + a: (struct){ 268 + b: (struct){ 269 + c: (int){ 2 } 270 + } 271 + } 272 + } 273 + forNestedEmpty: (struct){ 274 + a: (struct){ 275 + b: (struct){ 276 + none: (bool){ true } 277 + } 278 + } 279 + } 280 + forNestedNonEmpty: (struct){ 281 + a: (struct){ 282 + b: (struct){ 283 + "1": (int){ 1 } 284 + } 285 + } 286 + } 287 + nestedOuterFallback: (struct){ 288 + outer: (bool){ true } 289 + } 290 + nestedInnerFallback: (struct){ 291 + inner: (bool){ true } 292 + } 293 + } 176 294 -- out/compile -- 177 - tryTryFirstFails: reference "missing" not found: 178 - ./in.cue:73:10 179 - tryTrySecondFails.try[]: reference "missing" not found: 180 - ./in.cue:79:21 181 295 --- in.cue 182 296 { 183 297 ifTrue: { ··· 290 404 default: 0 291 405 } 292 406 } 407 + missing?: int 293 408 tryTryFirstFails: { 294 409 b: 2 295 - try x = _|_(reference "missing" not found) try y = 〈1;b〉? { 410 + try x = 〈1;missing〉? try y = 〈1;b〉? { 296 411 result: (〈2;x〉 + 〈1;y〉) 297 412 } else { 298 413 default: -1 ··· 300 415 } 301 416 tryTrySecondFails: { 302 417 a: 1 303 - try x = 〈0;a〉? try y = _|_(reference "missing" not found) { 418 + try x = 〈0;a〉? try y = 〈2;missing〉? { 304 419 result: (〈2;x〉 + 〈1;y〉) 305 420 } else { 306 421 default: -2