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
SR-5148 Indirect enum creates wrong case if associated type is an enum with a single case
Issue Description:
I have simple struct which works as configuration for network endpoint.
One problem is that without indirect keyword program crashes at runtime with cyclic metadata message. It's already reported as a bug in Swift JIRA.
Because Void is not decodable I've created this empty struct Nothing and conformed it to decodable.
Environment
Xcode 9.0 beta 1, Swift Language version: 4.0(happens in 3.2 mode, too)
Additional Detail from JIRA
md5: b04453aa8a0203e62d26a57841de7531
relates to:
Issue Description:
I have simple struct which works as configuration for network endpoint.
One problem is that without indirect keyword program crashes at runtime with cyclic metadata message. It's already reported as a bug in Swift JIRA.
Because Void is not decodable I've created this empty struct Nothing and conformed it to decodable.
Prints:
Which is very weird - it's not the case I specified I was thinking that it has to be something with memory layout and changed `Nothing` to this form:
Now same usage prints:
Which is totally fine.
Minimal reproduction example:
It's probably connected to S or Nothing having zero storage. With class it works as intended.
The text was updated successfully, but these errors were encountered: