{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/37131254","id":37131254,"diff_hunk":"@@ -1071,46 +1071,17 @@ private BoundExpression MakeLiftedUserDefinedConversionConsequence(BoundCall cal\n             TypeSymbol source = rewrittenOperand.Type;\n             TypeSymbol target = rewrittenType;\n \n-            TypeSymbol t0 = target.StrippedType();\n-            TypeSymbol s0 = source.StrippedType();\n-\n-            if (t0 != target && s0 != source)\n-            {\n-                // UNDONE: RewriteLiftedIntPtrConversion\n-\n-                return oldNode != null ?\n-                    oldNode.Update(\n-                        rewrittenOperand,\n-                        conversionKind,\n-                        oldNode.ResultKind,\n-                        isBaseConversion: oldNode.IsBaseConversion,\n-                        symbolOpt: symbolOpt,\n-                        @checked: @checked,\n-                        explicitCastInCode: explicitCastInCode,\n-                        isExtensionMethod: isExtensionMethod,\n-                        isArrayIndex: isArrayIndex,\n-                        constantValueOpt: constantValueOpt,\n-                        type: rewrittenType) :\n-                    new BoundConversion(\n-                        syntax,\n-                        rewrittenOperand,\n-                        conversionKind,\n-                        LookupResultKind.Viable,\n-                        isBaseConversion: false,\n-                        symbolOpt: symbolOpt,\n-                        @checked: @checked,\n-                        explicitCastInCode: explicitCastInCode,\n-                        isExtensionMethod: isExtensionMethod,\n-                        isArrayIndex: isArrayIndex,\n-                        constantValueOpt: constantValueOpt,\n-                        type: rewrittenType);\n-            }\n-\n             SpecialMember member = GetIntPtrConversionMethod(source: rewrittenOperand.Type, target: rewrittenType);\n             MethodSymbol method = GetSpecialTypeMethod(syntax, member);\n             Debug.Assert(!method.ReturnsVoid);\n             Debug.Assert(method.ParameterCount == 1);\n \n+            if (source.IsNullableType())\n+            {\n+                Debug.Assert(target.IsNullableType());\n+                return RewriteLiftedUserDefinedConversion(syntax, rewrittenOperand, method, rewrittenType, ConversionKind.IntPtr);","path":"src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_Conversion.cs","position":47,"original_position":47,"commit_id":"53ebbfe23a36df858fd5df1e775378c52ccaef18","original_commit_id":"53ebbfe23a36df858fd5df1e775378c52ccaef18","user":{"login":"gafter","id":3804346,"avatar_url":"https://avatars.githubusercontent.com/u/3804346?v=3","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"body":"should we be using `oldNode.Update` when `oldNode` is not `null`?","created_at":"2015-08-15T01:16:21Z","updated_at":"2015-08-15T01:16:21Z","html_url":"https://github.com/dotnet/roslyn/pull/4572#discussion_r37131254","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/4572","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/37131254"},"html":{"href":"https://github.com/dotnet/roslyn/pull/4572#discussion_r37131254"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/4572"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/4572","id":42510116,"html_url":"https://github.com/dotnet/roslyn/pull/4572","diff_url":"https://github.com/dotnet/roslyn/pull/4572.diff","patch_url":"https://github.com/dotnet/roslyn/pull/4572.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/4572","number":4572,"state":"open","locked":false,"title":"Lifted IntPtr Conversions","user":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars.githubusercontent.com/u/146967?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"body":"The compiler wasn't properly handling the case of a conversion between\r\n`Nullable<int>` and `Nullable<IntPtr>`.  The compiler specially handles\r\nIntPtr conversions but wasn't properly lowering them in the\r\nLocalRewriter.\r\n\r\nI verified the output IL and expression trees are identical to the\r\nnative compiler for these cases.\r\n\r\nThis closes DevDiv 1210529","created_at":"2015-08-15T00:45:49Z","updated_at":"2015-08-15T01:16:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f8ba7c9a78a76e1afae097d03947d55b74dd88d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/4572/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/4572/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/4572/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/53ebbfe23a36df858fd5df1e775378c52ccaef18","head":{"label":"jaredpar:nullable","ref":"nullable","sha":"53ebbfe23a36df858fd5df1e775378c52ccaef18","user":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars.githubusercontent.com/u/146967?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"repo":{"id":29310774,"name":"roslyn","full_name":"jaredpar/roslyn","owner":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars.githubusercontent.com/u/146967?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jaredpar/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/jaredpar/roslyn","forks_url":"https://api.github.com/repos/jaredpar/roslyn/forks","keys_url":"https://api.github.com/repos/jaredpar/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jaredpar/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jaredpar/roslyn/teams","hooks_url":"https://api.github.com/repos/jaredpar/roslyn/hooks","issue_events_url":"https://api.github.com/repos/jaredpar/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/jaredpar/roslyn/events","assignees_url":"https://api.github.com/repos/jaredpar/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/jaredpar/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/jaredpar/roslyn/tags","blobs_url":"https://api.github.com/repos/jaredpar/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jaredpar/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jaredpar/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/jaredpar/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jaredpar/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/jaredpar/roslyn/languages","stargazers_url":"https://api.github.com/repos/jaredpar/roslyn/stargazers","contributors_url":"https://api.github.com/repos/jaredpar/roslyn/contributors","subscribers_url":"https://api.github.com/repos/jaredpar/roslyn/subscribers","subscription_url":"https://api.github.com/repos/jaredpar/roslyn/subscription","commits_url":"https://api.github.com/repos/jaredpar/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/jaredpar/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/jaredpar/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/jaredpar/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/jaredpar/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/jaredpar/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jaredpar/roslyn/merges","archive_url":"https://api.github.com/repos/jaredpar/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jaredpar/roslyn/downloads","issues_url":"https://api.github.com/repos/jaredpar/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/jaredpar/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/jaredpar/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/jaredpar/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jaredpar/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/jaredpar/roslyn/releases{/id}","created_at":"2015-01-15T18:10:36Z","updated_at":"2015-03-26T17:29:26Z","pushed_at":"2015-08-15T00:50:59Z","git_url":"git://github.com/jaredpar/roslyn.git","ssh_url":"git@github.com:jaredpar/roslyn.git","clone_url":"https://github.com/jaredpar/roslyn.git","svn_url":"https://github.com/jaredpar/roslyn","homepage":"","size":91002,"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":"5be08f2fdc5a9519ba6e83c469f89fff0dd3baa4","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":29078997,"name":"roslyn","full_name":"dotnet/roslyn","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/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","created_at":"2015-01-11T02:39:03Z","updated_at":"2015-08-14T22:12:37Z","pushed_at":"2015-08-15T01:00:26Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"","size":164552,"stargazers_count":3013,"watchers_count":3013,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":677,"mirror_url":null,"open_issues_count":1339,"forks":677,"open_issues":1339,"watchers":3013,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/4572"},"html":{"href":"https://github.com/dotnet/roslyn/pull/4572"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/4572"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/4572/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/4572/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/4572/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/53ebbfe23a36df858fd5df1e775378c52ccaef18"}}}}