You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's nothing formally wrong with this, since the existential box for the `IndirectEnumType` existential type introduces indirection already. The crash is because of a calling convention mismatch between the protocol witness and the case constructor, which we can fix.
Environment
Xcode 12.3
Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
Target: x86_64-apple-darwin20.2.0
Additional Detail from JIRA
md5: 4ea4587179ea7c27cb24f95ce9490b74
is duplicated by:
Issue Description:
It's possible to create a nested enum without explicit `indirect` keyword by taking advantage of the fact that enum cases are protocol witnesses.
Trying to access the inner value in such case results in a runtime crash.
The minimal sample code reproducing the problem:
Even if the `indirect` keyword is provided, the crash on access to inner value still occurs:
The text was updated successfully, but these errors were encountered: