{"action":"opened","issue":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/14987","repository_url":"https://api.github.com/repos/lionheart/openradar-mirror","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/14987/labels{/name}","comments_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/14987/comments","events_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/14987/events","html_url":"https://github.com/lionheart/openradar-mirror/issues/14987","id":161945339,"number":14987,"title":"26805013: NSLayoutConstraint type hierarchy is broken","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":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/4","html_url":"https://github.com/lionheart/openradar-mirror/milestones/iOS%20SDK","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/4/labels","id":1237418,"number":4,"title":"iOS SDK","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":2479,"closed_issues":4,"state":"open","created_at":"2015-08-03T02:08:31Z","updated_at":"2016-06-23T15:01:57Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-06-23T15:01:57Z","updated_at":"2016-06-23T15:01:57Z","closed_at":null,"body":"#### Description\n\nSummary:\r\nNSLayout Subclasses use a recursive type description:\r\n\r\n```obj-c\r\n@interface NSLayoutYAxisAnchor :\r\nNSLayoutAnchor<NSLayoutYAxisAnchor *>\r\n@end\r\n```\r\n\r\nThis sort of recursive declaration in swift will just infinitely recurse and hang the compiler.\r\n\r\nI'm trying to write a function that will take an axis anchor and return an anchor.  IE:\r\n\r\n```swift\r\nfunc anchorForAxis(axis: NSLayoutYAxisAnchor) -> NSLayoutAnchor<AnyObject> {\r\n    return axis\r\n}\r\n```\r\nThis fails with the error:\r\n\r\nCannot convert return expression of type 'NSLayoutYAxisAnchor' to return type 'NSLayoutAnchor<AnyObject>'\r\n\r\nThis type of failure severely limits the usability of NSLayoutAnchor in swift.\r\n\r\nThis is being problematic in a library to provide operator overloads:\r\n\r\nhttps://github.com/raizlabs/anchorage\r\n\r\nSteps to Reproduce:\r\nAttempt to return an NSLayoutAnchor of an NSLayoutYAxisAnchor. IE:\r\n\r\nfunc anchorForAxis(axis: NSLayoutYAxisAnchor) -> NSLayoutAnchor<AnyObject> {\r\n    return axis\r\n}\r\n\r\n\r\nExpected Results:\r\nIt should work.\r\n\r\nActual Results:\r\nCannot convert return expression of type 'NSLayoutYAxisAnchor' to return type 'NSLayoutAnchor<AnyObject>'\r\n\r\n\r\nVersion:\r\nXcode Version 8.0 beta (8S128d)\r\n\r\nNotes:\r\n\r\n\r\nConfiguration:\r\niOS 10\n\n-\nProduct Version: \nCreated: 2016-06-15T02:28:42.437090\nOriginated: 2016-06-23T00:00:00\nOpen Radar Link: http://www.openradar.me/26805013"}}
{"actor":{"display_login":"openradar-mirror"}}