{"action":"opened","issue":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/6883","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/6883/labels{/name}","comments_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/6883/comments","events_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/6883/events","html_url":"https://github.com/lionheart/openradar-mirror/issues/6883","id":119881474,"number":6883,"title":"23718676: Swift similar generic functions runtime crash","user":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/classification:other%20bug","name":"classification:other bug","color":"e11d21"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/reproducible:always","name":"reproducible:always","color":"5319e7"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/status:open","name":"status:open","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/1","html_url":"https://github.com/lionheart/openradar-mirror/milestones/Developer%20Tools","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/1/labels","id":1237415,"number":1,"title":"Developer Tools","description":null,"creator":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"open_issues":1819,"closed_issues":11,"state":"open","created_at":"2015-08-03T02:08:29Z","updated_at":"2015-12-02T07:03:29Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-12-02T07:03:29Z","updated_at":"2015-12-02T07:03:29Z","closed_at":null,"body":"#### Description\n\nSummary:\r\n\r\nWhen you have multiple swift functions with very similar generic\r\nsignatures, the compiler crashes, especially when using the nil\r\ncoalescing operator.\r\n\r\nSteps to reproduce:\r\n\r\n1. Attempt to run the attached script with\r\n  `swift GenericFunctionCrash.swift`\r\n\r\nExpected results:\r\n\r\nEverything runs correctly.\r\n\r\nActual results:\r\n\r\nIt crashes at runtime with this error:\r\n\r\n```\r\nCould not cast value of type 'Swift.String' to 'Swift.Optional<Swift.String>'\r\n```\r\n\r\nNotes:\r\n\r\n- Doing `\"foo\" as! String?` should work fine (as seen in the repl)\r\n- If you comment out the fallback using the `??` operator, it runs fine\r\n- If you comment out the similar generic function, it runs fine\n\n-\nProduct Version: Swift 2.1\nCreated: 2015-12-02T05:02:41.406020\nOriginated: 2015-12-01T21:02:00\nOpen Radar Link: http://www.openradar.me/23718676"}}