From b0ebe6ad30ce2584aa221b3ed8d10042bd9e97ac Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 10 Jun 2016 11:14:17 +0200 Subject: Fix #856: Handle try/catch cases as catch cases if possible. Previously they were all lifted into a match with the came cases. Now the first cases are handled directly by by the catch. If one of the cases can not be handled the old scheme is applied to to it and all subsequent cases. --- tests/run/tryPatternMatch.check | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/run/tryPatternMatch.check (limited to 'tests/run/tryPatternMatch.check') diff --git a/tests/run/tryPatternMatch.check b/tests/run/tryPatternMatch.check new file mode 100644 index 000000000..44f7b7d5a --- /dev/null +++ b/tests/run/tryPatternMatch.check @@ -0,0 +1,20 @@ +success 1 +success 2 +success 3 +success 4 +success 5 +success 6 +success 7 +success 8 +success 9.1 +success 9.2 +IllegalArgumentException: abc +IllegalArgumentException +NullPointerException | IOException +NoSuchElementException +EX +InnerException +NullPointerException +ExceptionTrait +ClassCastException +TimeoutException escaped -- cgit v1.2.3