[SR-9036] Passing a dictionary as parameter of initializer of ObjC class in Swift, yields "null" value #51539
Labels
access control
Feature → modifiers: Access control and access levels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
regression
swift 4.2
Attachment: Download
Environment
SwiftObjCPlay.zip
Additional Detail from JIRA
md5: 05dc781faf00fc6c7a8030c7994f7a76
Issue Description:
Weird situation I've stumbled upon once upgrading to XCode 10.
I have an ObjectiveC class which I initialize in Swift. The initializer accepts NSDictionary as a parameter. If I pass in the dictionary directly into the initializer like so:
Then, back in ObjC world, when printing the contents of the dictionary it shows the value as
"(null)"
.Everything works fine if I do:
This issue exists on any version of Swift on XCode 10. The issue doesn't exist on XCode 9.
I am attaching a sample project where this is illustrated.
The text was updated successfully, but these errors were encountered: