[ https://issues.apache.org/jira/browse/THRIFT-5195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Darius Jankauskas closed THRIFT-5195. ------------------------------------- Resolution: Fixed > Swift enums (generated from Thrift unions) don't work > ----------------------------------------------------- > > Key: THRIFT-5195 > URL: https://issues.apache.org/jira/browse/THRIFT-5195 > Project: Thrift > Issue Type: Bug > Components: Swift - Library > Affects Versions: 0.14.0 > Reporter: Darius Jankauskas > Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > I have some service functions not working. The required argument it takes is > a Swift enum with associated value. This was generated from a Thrift union > with all optional fields. The problem is that the associated value never gets > sent to the server, i.e. TStruct.write() never encounters the associated > value. Deeper in the forEach() method the propName is found but returns null > in > {code:swift} > if let tval = unwrap(any: propValue) as? TSerializable, let id = > Self.fieldIds[propName] {{code} > I've never used reflection (the Mirror class) nor contributed here but am > willing to try. > If anyone has any ideas/suggestions how to fix this, please let me know. -- This message was sent by Atlassian Jira (v8.3.4#803005)