{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corert/pulls/comments/68460351","id":68460351,"diff_hunk":"@@ -159,7 +159,22 @@ public override MethodDesc GetFinalizer()\n             MethodDesc typicalFinalizer = _typeDef.GetFinalizer();\n             if (typicalFinalizer == null)\n                 return null;\n-            return _typeDef.Context.GetMethodForInstantiatedType(typicalFinalizer, this);\n+\n+            MetadataType typeInHierarchy = this;\n+            while (typicalFinalizer.OwningType.GetTypeDefinition() != typeInHierarchy.GetTypeDefinition())","path":"src/Common/src/TypeSystem/Common/InstantiatedType.cs","position":7,"original_position":7,"commit_id":"3f073b331958fcc332be4541e8706d82b9b64a08","original_commit_id":"3f073b331958fcc332be4541e8706d82b9b64a08","user":{"login":"davidwrighton","id":10779849,"avatar_url":"https://avatars.githubusercontent.com/u/10779849?v=3","gravatar_id":"","url":"https://api.github.com/users/davidwrighton","html_url":"https://github.com/davidwrighton","followers_url":"https://api.github.com/users/davidwrighton/followers","following_url":"https://api.github.com/users/davidwrighton/following{/other_user}","gists_url":"https://api.github.com/users/davidwrighton/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwrighton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwrighton/subscriptions","organizations_url":"https://api.github.com/users/davidwrighton/orgs","repos_url":"https://api.github.com/users/davidwrighton/repos","events_url":"https://api.github.com/users/davidwrighton/events{/privacy}","received_events_url":"https://api.github.com/users/davidwrighton/received_events","type":"User","site_admin":false},"body":"No it isn't. If the finalizer is implemented on a base type that is also a generic, then the _typeDef in that case is a MethodForInstantiatedType for an instantiated type which is instantiated over the open type variables of the derived type.","created_at":"2016-06-24T20:47:41Z","updated_at":"2016-06-24T20:47:41Z","html_url":"https://github.com/dotnet/corert/pull/1436#discussion_r68460351","pull_request_url":"https://api.github.com/repos/dotnet/corert/pulls/1436","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corert/pulls/comments/68460351"},"html":{"href":"https://github.com/dotnet/corert/pull/1436#discussion_r68460351"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corert/pulls/1436"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corert/pulls/1436","id":75164743,"html_url":"https://github.com/dotnet/corert/pull/1436","diff_url":"https://github.com/dotnet/corert/pull/1436.diff","patch_url":"https://github.com/dotnet/corert/pull/1436.patch","issue_url":"https://api.github.com/repos/dotnet/corert/issues/1436","number":1436,"state":"open","locked":false,"title":"Fix issues with instantiated generics","user":{"login":"davidwrighton","id":10779849,"avatar_url":"https://avatars.githubusercontent.com/u/10779849?v=3","gravatar_id":"","url":"https://api.github.com/users/davidwrighton","html_url":"https://github.com/davidwrighton","followers_url":"https://api.github.com/users/davidwrighton/followers","following_url":"https://api.github.com/users/davidwrighton/following{/other_user}","gists_url":"https://api.github.com/users/davidwrighton/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwrighton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwrighton/subscriptions","organizations_url":"https://api.github.com/users/davidwrighton/orgs","repos_url":"https://api.github.com/users/davidwrighton/repos","events_url":"https://api.github.com/users/davidwrighton/events{/privacy}","received_events_url":"https://api.github.com/users/davidwrighton/received_events","type":"User","site_admin":false},"body":"- IsFinal property not correctly implemented for MethodForInstantiatedType\r\n- GetFinalizer does not work if the type does not implement the finalizer directly, but instead inherits it from the parent type","created_at":"2016-06-24T19:52:26Z","updated_at":"2016-06-24T20:47:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bae9f74ea35b3b1ba0fd1a1a8a49a70788cdbec","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corert/pulls/1436/commits","review_comments_url":"https://api.github.com/repos/dotnet/corert/pulls/1436/comments","review_comment_url":"https://api.github.com/repos/dotnet/corert/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corert/issues/1436/comments","statuses_url":"https://api.github.com/repos/dotnet/corert/statuses/3f073b331958fcc332be4541e8706d82b9b64a08","head":{"label":"davidwrighton:fix_instantiated_issues","ref":"fix_instantiated_issues","sha":"3f073b331958fcc332be4541e8706d82b9b64a08","user":{"login":"davidwrighton","id":10779849,"avatar_url":"https://avatars.githubusercontent.com/u/10779849?v=3","gravatar_id":"","url":"https://api.github.com/users/davidwrighton","html_url":"https://github.com/davidwrighton","followers_url":"https://api.github.com/users/davidwrighton/followers","following_url":"https://api.github.com/users/davidwrighton/following{/other_user}","gists_url":"https://api.github.com/users/davidwrighton/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwrighton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwrighton/subscriptions","organizations_url":"https://api.github.com/users/davidwrighton/orgs","repos_url":"https://api.github.com/users/davidwrighton/repos","events_url":"https://api.github.com/users/davidwrighton/events{/privacy}","received_events_url":"https://api.github.com/users/davidwrighton/received_events","type":"User","site_admin":false},"repo":{"id":46448811,"name":"corert","full_name":"davidwrighton/corert","owner":{"login":"davidwrighton","id":10779849,"avatar_url":"https://avatars.githubusercontent.com/u/10779849?v=3","gravatar_id":"","url":"https://api.github.com/users/davidwrighton","html_url":"https://github.com/davidwrighton","followers_url":"https://api.github.com/users/davidwrighton/followers","following_url":"https://api.github.com/users/davidwrighton/following{/other_user}","gists_url":"https://api.github.com/users/davidwrighton/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwrighton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwrighton/subscriptions","organizations_url":"https://api.github.com/users/davidwrighton/orgs","repos_url":"https://api.github.com/users/davidwrighton/repos","events_url":"https://api.github.com/users/davidwrighton/events{/privacy}","received_events_url":"https://api.github.com/users/davidwrighton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidwrighton/corert","description":"This repo contains CoreRT, a .NET Core runtime optimized for AOT (ahead of time compilation) scenarios, with the accompanying .NET Native compiler toolchain.","fork":true,"url":"https://api.github.com/repos/davidwrighton/corert","forks_url":"https://api.github.com/repos/davidwrighton/corert/forks","keys_url":"https://api.github.com/repos/davidwrighton/corert/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidwrighton/corert/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidwrighton/corert/teams","hooks_url":"https://api.github.com/repos/davidwrighton/corert/hooks","issue_events_url":"https://api.github.com/repos/davidwrighton/corert/issues/events{/number}","events_url":"https://api.github.com/repos/davidwrighton/corert/events","assignees_url":"https://api.github.com/repos/davidwrighton/corert/assignees{/user}","branches_url":"https://api.github.com/repos/davidwrighton/corert/branches{/branch}","tags_url":"https://api.github.com/repos/davidwrighton/corert/tags","blobs_url":"https://api.github.com/repos/davidwrighton/corert/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidwrighton/corert/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidwrighton/corert/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidwrighton/corert/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidwrighton/corert/statuses/{sha}","languages_url":"https://api.github.com/repos/davidwrighton/corert/languages","stargazers_url":"https://api.github.com/repos/davidwrighton/corert/stargazers","contributors_url":"https://api.github.com/repos/davidwrighton/corert/contributors","subscribers_url":"https://api.github.com/repos/davidwrighton/corert/subscribers","subscription_url":"https://api.github.com/repos/davidwrighton/corert/subscription","commits_url":"https://api.github.com/repos/davidwrighton/corert/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidwrighton/corert/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidwrighton/corert/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidwrighton/corert/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidwrighton/corert/contents/{+path}","compare_url":"https://api.github.com/repos/davidwrighton/corert/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidwrighton/corert/merges","archive_url":"https://api.github.com/repos/davidwrighton/corert/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidwrighton/corert/downloads","issues_url":"https://api.github.com/repos/davidwrighton/corert/issues{/number}","pulls_url":"https://api.github.com/repos/davidwrighton/corert/pulls{/number}","milestones_url":"https://api.github.com/repos/davidwrighton/corert/milestones{/number}","notifications_url":"https://api.github.com/repos/davidwrighton/corert/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidwrighton/corert/labels{/name}","releases_url":"https://api.github.com/repos/davidwrighton/corert/releases{/id}","deployments_url":"https://api.github.com/repos/davidwrighton/corert/deployments","created_at":"2015-11-18T21:31:59Z","updated_at":"2016-03-21T21:06:46Z","pushed_at":"2016-06-24T19:53:54Z","git_url":"git://github.com/davidwrighton/corert.git","ssh_url":"git@github.com:davidwrighton/corert.git","clone_url":"https://github.com/davidwrighton/corert.git","svn_url":"https://github.com/davidwrighton/corert","homepage":"http://dotnet.github.io/","size":9905,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"b92ca2484fd8e46288c1461977068714a772479b","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":42552143,"name":"corert","full_name":"dotnet/corert","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/corert","description":"This repo contains CoreRT, a .NET Core runtime optimized for AOT (ahead of time compilation) scenarios, with the accompanying .NET Native compiler toolchain.","fork":false,"url":"https://api.github.com/repos/dotnet/corert","forks_url":"https://api.github.com/repos/dotnet/corert/forks","keys_url":"https://api.github.com/repos/dotnet/corert/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corert/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corert/teams","hooks_url":"https://api.github.com/repos/dotnet/corert/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corert/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corert/events","assignees_url":"https://api.github.com/repos/dotnet/corert/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corert/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corert/tags","blobs_url":"https://api.github.com/repos/dotnet/corert/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corert/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corert/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corert/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corert/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corert/languages","stargazers_url":"https://api.github.com/repos/dotnet/corert/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corert/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corert/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corert/subscription","commits_url":"https://api.github.com/repos/dotnet/corert/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corert/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corert/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corert/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corert/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corert/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corert/merges","archive_url":"https://api.github.com/repos/dotnet/corert/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corert/downloads","issues_url":"https://api.github.com/repos/dotnet/corert/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corert/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corert/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corert/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corert/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corert/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/corert/deployments","created_at":"2015-09-15T23:10:53Z","updated_at":"2016-06-24T07:53:51Z","pushed_at":"2016-06-24T19:52:26Z","git_url":"git://github.com/dotnet/corert.git","ssh_url":"git@github.com:dotnet/corert.git","clone_url":"https://github.com/dotnet/corert.git","svn_url":"https://github.com/dotnet/corert","homepage":"http://dotnet.github.io/","size":18299,"stargazers_count":361,"watchers_count":361,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":102,"mirror_url":null,"open_issues_count":140,"forks":102,"open_issues":140,"watchers":361,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corert/pulls/1436"},"html":{"href":"https://github.com/dotnet/corert/pull/1436"},"issue":{"href":"https://api.github.com/repos/dotnet/corert/issues/1436"},"comments":{"href":"https://api.github.com/repos/dotnet/corert/issues/1436/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corert/pulls/1436/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corert/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corert/pulls/1436/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corert/statuses/3f073b331958fcc332be4541e8706d82b9b64a08"}}}}
{"actor":{"display_login":"davidwrighton"}}