{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corert/issues/1183","repository_url":"https://api.github.com/repos/dotnet/corert","labels_url":"https://api.github.com/repos/dotnet/corert/issues/1183/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corert/issues/1183/comments","events_url":"https://api.github.com/repos/dotnet/corert/issues/1183/events","html_url":"https://github.com/dotnet/corert/pull/1183","id":150210282,"number":1183,"title":"Implement CanCastTo","user":{"login":"MichalStrehovsky","id":13110571,"avatar_url":"https://avatars.githubusercontent.com/u/13110571?v=3","gravatar_id":"","url":"https://api.github.com/users/MichalStrehovsky","html_url":"https://github.com/MichalStrehovsky","followers_url":"https://api.github.com/users/MichalStrehovsky/followers","following_url":"https://api.github.com/users/MichalStrehovsky/following{/other_user}","gists_url":"https://api.github.com/users/MichalStrehovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/MichalStrehovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichalStrehovsky/subscriptions","organizations_url":"https://api.github.com/users/MichalStrehovsky/orgs","repos_url":"https://api.github.com/users/MichalStrehovsky/repos","events_url":"https://api.github.com/users/MichalStrehovsky/events{/privacy}","received_events_url":"https://api.github.com/users/MichalStrehovsky/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corert/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2016-04-21T22:34:36Z","updated_at":"2016-04-23T16:39:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/corert/pulls/1183","html_url":"https://github.com/dotnet/corert/pull/1183","diff_url":"https://github.com/dotnet/corert/pull/1183.diff","patch_url":"https://github.com/dotnet/corert/pull/1183.patch"},"body":"Type system support for answering questions about whether a type\r\ncan be cast to another type, along with unit tests.\r\n\r\nI largely ported the C++ code from the Project N compiler to C#. The only\r\ndivergence is in the handling of casting arrays to System.Array and array\r\ninterfaces. We won't use the \"treat it as `Array<T>`\" wart in CoreRT.\r\nThe unit tests are all new because there were none.\r\n\r\nI'm also adding a few convenience properties to the type system, stolen\r\nfrom the Project N compiler type system:\r\n\r\n* Added `SzArray` flag to `TypeFlags`\r\n* A few new `HasXXX` and `IsXXX` shortcuts on `GenericParameterDesc`. Makes code much more readable.\r\n* `IsGenericParameter` and `IsDefType` on `TypeDesc`. This brings the existing `IsArray`, `IsPointer` etc. to completion.\r\n* `HasVariance` on `TypeDesc`. This is a cached answer to whether a type has variance. It lets us quickly decide if we need to do the slow things."},"comment":{"url":"https://api.github.com/repos/dotnet/corert/issues/comments/213777331","html_url":"https://github.com/dotnet/corert/pull/1183#issuecomment-213777331","issue_url":"https://api.github.com/repos/dotnet/corert/issues/1183","id":213777331,"user":{"login":"MichalStrehovsky","id":13110571,"avatar_url":"https://avatars.githubusercontent.com/u/13110571?v=3","gravatar_id":"","url":"https://api.github.com/users/MichalStrehovsky","html_url":"https://github.com/MichalStrehovsky","followers_url":"https://api.github.com/users/MichalStrehovsky/followers","following_url":"https://api.github.com/users/MichalStrehovsky/following{/other_user}","gists_url":"https://api.github.com/users/MichalStrehovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/MichalStrehovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichalStrehovsky/subscriptions","organizations_url":"https://api.github.com/users/MichalStrehovsky/orgs","repos_url":"https://api.github.com/users/MichalStrehovsky/repos","events_url":"https://api.github.com/users/MichalStrehovsky/events{/privacy}","received_events_url":"https://api.github.com/users/MichalStrehovsky/received_events","type":"User","site_admin":false},"created_at":"2016-04-23T16:39:50Z","updated_at":"2016-04-23T16:39:50Z","body":"@dotnet-bot test OSX Debug"}}