File tree Expand file tree Collapse file tree 2 files changed +72
-0
lines changed Expand file tree Collapse file tree 2 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,71 @@ Program {
361
361
}
362
362
` ;
363
363
364
+ exports [` boolean multiple catch without variable 1` ] = `
365
+ Program {
366
+ " children" : Array [
367
+ Try {
368
+ " always" : null ,
369
+ " body" : Block {
370
+ " children" : Array [
371
+ ExpressionStatement {
372
+ " expression" : Call {
373
+ " arguments" : Array [],
374
+ " kind" : " call" ,
375
+ " what" : Name {
376
+ " kind" : " name" ,
377
+ " name" : " call" ,
378
+ " resolution" : " uqn" ,
379
+ },
380
+ },
381
+ " kind" : " expressionstatement" ,
382
+ },
383
+ ],
384
+ " kind" : " block" ,
385
+ },
386
+ " catches" : Array [
387
+ Catch {
388
+ " body" : Block {
389
+ " children" : Array [
390
+ ExpressionStatement {
391
+ " expression" : Call {
392
+ " arguments" : Array [],
393
+ " kind" : " call" ,
394
+ " what" : Name {
395
+ " kind" : " name" ,
396
+ " name" : " do_something" ,
397
+ " resolution" : " uqn" ,
398
+ },
399
+ },
400
+ " kind" : " expressionstatement" ,
401
+ },
402
+ ],
403
+ " kind" : " block" ,
404
+ },
405
+ " kind" : " catch" ,
406
+ " variable" : null ,
407
+ " what" : Array [
408
+ Name {
409
+ " kind" : " name" ,
410
+ " name" : " MyException" ,
411
+ " resolution" : " uqn" ,
412
+ },
413
+ Name {
414
+ " kind" : " name" ,
415
+ " name" : " MyOtherException" ,
416
+ " resolution" : " uqn" ,
417
+ },
418
+ ],
419
+ },
420
+ ],
421
+ " kind" : " try" ,
422
+ },
423
+ ],
424
+ " errors" : Array [],
425
+ " kind" : " program" ,
426
+ }
427
+ ` ;
428
+
364
429
exports [` boolean qualified name 1` ] = `
365
430
Program {
366
431
" children" : Array [
Original file line number Diff line number Diff line change @@ -56,6 +56,13 @@ describe("boolean", () => {
56
56
)
57
57
) . toMatchSnapshot ( ) ;
58
58
} ) ;
59
+ it ( "multiple catch without variable" , ( ) => {
60
+ expect (
61
+ parser . parseEval (
62
+ "try { call(); } catch (MyException | MyOtherException) { do_something(); }"
63
+ )
64
+ ) . toMatchSnapshot ( ) ;
65
+ } ) ;
59
66
it ( "multiple catch #2" , ( ) => {
60
67
expect (
61
68
parser . parseEval (
You can’t perform that action at this time.
0 commit comments