{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1438","repository_url":"https://api.github.com/repos/apple/swift-corelibs-foundation","labels_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1438/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1438/comments","events_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1438/events","html_url":"https://github.com/apple/swift-corelibs-foundation/pull/1438","id":297806733,"number":1438,"title":"NSDictionary fix when key is a String rather than NSString.","user":{"login":"johnno1962","id":1786033,"avatar_url":"https://avatars3.githubusercontent.com/u/1786033?v=4","gravatar_id":"","url":"https://api.github.com/users/johnno1962","html_url":"https://github.com/johnno1962","followers_url":"https://api.github.com/users/johnno1962/followers","following_url":"https://api.github.com/users/johnno1962/following{/other_user}","gists_url":"https://api.github.com/users/johnno1962/gists{/gist_id}","starred_url":"https://api.github.com/users/johnno1962/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnno1962/subscriptions","organizations_url":"https://api.github.com/users/johnno1962/orgs","repos_url":"https://api.github.com/users/johnno1962/repos","events_url":"https://api.github.com/users/johnno1962/events{/privacy}","received_events_url":"https://api.github.com/users/johnno1962/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-02-16T14:41:41Z","updated_at":"2018-02-21T22:51:00Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apple/swift-corelibs-foundation/pulls/1438","html_url":"https://github.com/apple/swift-corelibs-foundation/pull/1438","diff_url":"https://github.com/apple/swift-corelibs-foundation/pull/1438.diff","patch_url":"https://github.com/apple/swift-corelibs-foundation/pull/1438.patch"},"body":"Hi Apple,\r\n\r\nUsing a String as a key when setting a value in an NSDictionary causes a crash on Linux. This minor fix brings it into line with Darwin Foundation where this is possible.\r\n\r\n```\r\nCould not cast value of type 'Swift.AnyHashable' (0x1027b3b10) to 'SwiftFoundation.NSObject' (0x101a56668).\r\n2018-02-16 14:30:46.355774+0000 TestFoundation[7306:8715333] Could not cast value of type 'Swift.AnyHashable' (0x1027b3b10) to 'SwiftFoundation.NSObject' (0x101a56668).\r\n(lldb) up\r\nframe #9: 0x000000010165b114 SwiftFoundation`NSMutableDictionary.subscript.setter(newValue=some, key=Swift.AnyHashable @ 0x00007fff5fbfcd88, self=0x000060800e181fe0) at NSDictionary.swift:649\r\n   646 \t        }\r\n   647 \t        set {\r\n   648 \t            if let val = newValue {\r\n-> 649 \t                setObject(val, forKey: key)\r\n   650 \t            } else {\r\n   651 \t                removeObject(forKey: key)\r\n   652 \t            }\r\n(lldb) up\r\nframe #10: 0x00000001004c0443 TestFoundation`static Dictionary.twEncode(data=TestFoundation.TwoWayMirror @ 0x00007fff5fbfce00, self=[Key : Value]) at TwoWayMirror.swift:386\r\n   383 \t            #if os(Linux)\r\n   384 \t            let key = NSString(string: key as! String)\r\n   385 \t            #endif\r\n-> 386 \t            dict[key] = TwoWayMirror.encode(mirror: &mirror)\r\n   387 \t        }\r\n   388 \t        return dict\r\n   389 \t    }\r\n(lldb)\r\n```"},"comment":{"url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/comments/367504694","html_url":"https://github.com/apple/swift-corelibs-foundation/pull/1438#issuecomment-367504694","issue_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1438","id":367504694,"user":{"login":"millenomi","id":44005,"avatar_url":"https://avatars0.githubusercontent.com/u/44005?v=4","gravatar_id":"","url":"https://api.github.com/users/millenomi","html_url":"https://github.com/millenomi","followers_url":"https://api.github.com/users/millenomi/followers","following_url":"https://api.github.com/users/millenomi/following{/other_user}","gists_url":"https://api.github.com/users/millenomi/gists{/gist_id}","starred_url":"https://api.github.com/users/millenomi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/millenomi/subscriptions","organizations_url":"https://api.github.com/users/millenomi/orgs","repos_url":"https://api.github.com/users/millenomi/repos","events_url":"https://api.github.com/users/millenomi/events{/privacy}","received_events_url":"https://api.github.com/users/millenomi/received_events","type":"User","site_admin":false},"created_at":"2018-02-21T22:51:00Z","updated_at":"2018-02-21T22:51:00Z","author_association":"CONTRIBUTOR","body":"@swift-ci please test and merge"}}
{"actor":{"display_login":"millenomi"}}