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
swift-ci opened this issue
Jun 20, 2017
· 2 comments
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfIRGenLLVM IR generation
When reading the `property_getAttributes` in a PFObject subclass in objective-c, the type encoding is property set to: `@"PFRelation\` therefore our codepath is correct as per the test suite here
when defining it in a swift subclass however, the type encoding looses the PFRelation specialization and is rendered as an `@` which is inconsistent with the behaviour with the objective-c runtime.
This doesn't have anything to do with generics, and isn't a regression. You're just saying Swift should try to emit property attributes with class names.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfIRGenLLVM IR generation
Environment
Swift 3.1, Swift 3.2, Swift 4
Additional Detail from JIRA
md5: 0a210a9676dd780ea82e37b9d324abfb
Issue Description:
While migrating from Swift 2 to Swift 3.1, for the Parse iOS SDK, we encountered the following issue:
PFRelation< ObjectType: PFObject*> is defined in Objective-C as a lightweight generic.
When reading the `property_getAttributes` in a PFObject subclass in objective-c, the type encoding is property set to: `@"PFRelation\` therefore our codepath is correct as per the test suite here
when defining it in a swift subclass however, the type encoding looses the PFRelation specialization and is rendered as an `@` which is inconsistent with the behaviour with the objective-c runtime.
ex:
We expect the behaviour to be consistent and the swift compiler to produce the right type encoding, in conformance with the objective-c compiler.
Note: observed as well on Swift 4
The text was updated successfully, but these errors were encountered: