File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,7 @@ contents =
361
361
\try : ({compile , compile -many }:env , ...args) ->
362
362
363
363
is -part = (thing , clause -name ) ->
364
+ if not (thing instanceof list ) then return false
364
365
first = thing .content.0
365
366
(first instanceof atom ) && (first .text! is clause -name )
366
367
Original file line number Diff line number Diff line change @@ -406,6 +406,23 @@ test "try-catch (with `catch` and `finally`)" ->
406
406
}
407
407
"""
408
408
409
+ test "try-catch (with plain atom in body)" ->
410
+ esl '''
411
+ (try foo
412
+ (catch e
413
+ bar)
414
+ (finally baz))
415
+ '''
416
+ ..`@equals ` """
417
+ try {
418
+ foo;
419
+ } catch (e) {
420
+ bar;
421
+ } finally {
422
+ baz;
423
+ }
424
+ """
425
+
409
426
test "try-catch (with empty body, `catch` and `finally`)" ->
410
427
esl '''
411
428
(try (catch err)
You can’t perform that action at this time.
0 commit comments