Dealias in isSimpleThrowable check#24744
Conversation
|
@hamzaremmal Maybe you could review since you left a comment on the issue. Reading the doc for |
|
Hi @eejbyfeldt, the diff seems small but I want to double check things for a spec point of view before approving. I'll add it into my todos of next week. |
|
I think this PR has the correct behaviour, given we consider the I'm wondering, can we generate byte code for simple catch like |
|
I remember that try-catch doesn't support I have a local test about |
I'm curious, can I take a look of the test? |
|
@noti0na1 Sorry I have no idea why I wrote this. Probably just noodling. |
There was a problem hiding this comment.
Hi @eejbyfeldt, I've just taken a look at the spec and played a bit with some examples and this is indeed the right fix for this issue 👍🏻. Nevertheless, the test could be more robust and should highlight the fact that we should not match in the E1or2 case since Exception <: E1 and Exception <: E2 are false.
I will also suggest adding a test that shows when we throw E1 and E2 separately, we will have the right semantics.
hamzaremmal
left a comment
There was a problem hiding this comment.
Thanks @eejbyfeldt for the fix!
fixes: #24357