Open swift-ci opened 7 years ago
@gregomni, are you still looking at these "compound switch case" issues? If not, @jckarter, who should take this?
(This may also be fixed in master; I didn't check.)
I don't believe it is fixed. If @atrick gets far enough along with SSA generics, that would obviate the need for a fix here.
Unfortunately, it's been quite a while since I've been able to give this project any significant time, so if someone else is able to take it on, that would probably be for the best. Sorry!
Yeah, it does seem as if Andrew Trick's plan would necessarily❓ remove the distinction between the "normal" enum_unchecked_data and the unchecked_take_enum_data_addr that is what makes this problem difficult. At least it would move the issue down lower where the solution would be more general and hopefully easier.
Environment
Xcode Version 8.2.1 (8C1002) - Swift included in Xcode (no development version)Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, RunTimeCrash | |Assignee | None | |Priority | Medium | md5: d08637b4581d6bf40f0bc3516e0f5fb3Issue Description:
Hi,
Please, skip the logical part of the code and the decision why it is written as it is.
I have one protocol called Expression
My two structs Mood and Theme conform to this protocol.
Now I have an enum like below
When actually I want to check whether the item I have is an Expression item, I check it in this way
This seems to make totally sense to the compiler (it compiles without any problem, and it makes sense actually because I'm treating the associated type as same type), but it crashes at runtime.