{"action":"opened","issue":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/7404","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/7404/labels{/name}","comments_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/7404/comments","events_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/7404/events","html_url":"https://github.com/lionheart/openradar-mirror/issues/7404","id":126500783,"number":7404,"title":"24173309: Swift: Crash when printing `self.dynamicType` in a protocol extension constrained on Objective-C subclass","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:crash/hang/data%20loss","name":"classification:crash/hang/data loss","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":1961,"closed_issues":12,"state":"open","created_at":"2015-08-03T02:08:29Z","updated_at":"2016-01-13T20:01:07Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-01-13T20:01:07Z","updated_at":"2016-01-13T20:01:07Z","closed_at":null,"body":"#### Description\n\nSummary:\nAccessing `self.dynamicType` in a protocol extension constrained on Objective-C subclass in Swift causes a bad memory access.\n\nSteps to Reproduce:\nRun the following code:\n\n```swift\nimport Foundation\n// doesn't crash when subclassing a non-Objective-C class, or not subclassing\nclass Class1: NSObject, Protocol1 {}\n\nprotocol Protocol1 {}\n// doesn't crash without the type constraint, or with a different constraint ('Self: Hashable')\nextension Protocol1 where Self: Class1 {\n    func printType() {\n        print(self.dynamicType)\n        // also crashes:\n        // _ = String(self.dynamicType)\n        // self.dynamicType.description()\n    }\n}\n\nClass1().printType() // EXC_BAD_ACCESS\n```\n\nExpected Results:\nAccessing `self.dynamicType` in a protocol extension constrained on Objective-C subclass in Swift should return the calling type.\n\nActual Results:\nAccessing `self.dynamicType` in a protocol extension constrained on Objective-C subclass in Swift causes a bad memory access.\n\nRegression:\nN/A\n\nNotes:\nN/A\n\n-\nProduct Version: Xcode-7.2 (7C68)\nCreated: 2016-01-13T19:56:54.553160\nOriginated: 2016-01-13T11:56:00\nOpen Radar Link: http://www.openradar.me/24173309"}}