{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/11958","repository_url":"https://api.github.com/repos/dotnet/roslyn","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/11958/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/11958/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/11958/events","html_url":"https://github.com/dotnet/roslyn/issues/11958","id":159900519,"number":11958,"title":"Bug in ParenthesizedExpressionSyntaxExtensions.cs?","user":{"login":"KrisVandermotten","id":273237,"avatar_url":"https://avatars.githubusercontent.com/u/273237?v=3","gravatar_id":"","url":"https://api.github.com/users/KrisVandermotten","html_url":"https://github.com/KrisVandermotten","followers_url":"https://api.github.com/users/KrisVandermotten/followers","following_url":"https://api.github.com/users/KrisVandermotten/following{/other_user}","gists_url":"https://api.github.com/users/KrisVandermotten/gists{/gist_id}","starred_url":"https://api.github.com/users/KrisVandermotten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrisVandermotten/subscriptions","organizations_url":"https://api.github.com/users/KrisVandermotten/orgs","repos_url":"https://api.github.com/users/KrisVandermotten/repos","events_url":"https://api.github.com/users/KrisVandermotten/events{/privacy}","received_events_url":"https://api.github.com/users/KrisVandermotten/received_events","type":"User","site_admin":false},"labels":[{"id":166377917,"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-IDE","name":"Area-IDE","color":"5319e7","default":false},{"id":165001069,"url":"https://api.github.com/repos/dotnet/roslyn/labels/Bug","name":"Bug","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":{"login":"DustinCampbell","id":116161,"avatar_url":"https://avatars.githubusercontent.com/u/116161?v=3","gravatar_id":"","url":"https://api.github.com/users/DustinCampbell","html_url":"https://github.com/DustinCampbell","followers_url":"https://api.github.com/users/DustinCampbell/followers","following_url":"https://api.github.com/users/DustinCampbell/following{/other_user}","gists_url":"https://api.github.com/users/DustinCampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/DustinCampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DustinCampbell/subscriptions","organizations_url":"https://api.github.com/users/DustinCampbell/orgs","repos_url":"https://api.github.com/users/DustinCampbell/repos","events_url":"https://api.github.com/users/DustinCampbell/events{/privacy}","received_events_url":"https://api.github.com/users/DustinCampbell/received_events","type":"User","site_admin":false},"assignees":[{"login":"DustinCampbell","id":116161,"avatar_url":"https://avatars.githubusercontent.com/u/116161?v=3","gravatar_id":"","url":"https://api.github.com/users/DustinCampbell","html_url":"https://github.com/DustinCampbell","followers_url":"https://api.github.com/users/DustinCampbell/followers","following_url":"https://api.github.com/users/DustinCampbell/following{/other_user}","gists_url":"https://api.github.com/users/DustinCampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/DustinCampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DustinCampbell/subscriptions","organizations_url":"https://api.github.com/users/DustinCampbell/orgs","repos_url":"https://api.github.com/users/DustinCampbell/repos","events_url":"https://api.github.com/users/DustinCampbell/events{/privacy}","received_events_url":"https://api.github.com/users/DustinCampbell/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/18","html_url":"https://github.com/dotnet/roslyn/milestone/18","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/18/labels","id":1675130,"number":18,"title":"3.0","description":"The version *after* the next major version.","creator":{"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},"open_issues":339,"closed_issues":15,"state":"open","created_at":"2016-03-31T00:06:25Z","updated_at":"2017-02-08T21:25:27Z","due_on":null,"closed_at":null},"comments":25,"created_at":"2016-06-13T08:48:43Z","updated_at":"2017-02-09T01:19:50Z","closed_at":null,"body":"**Version Used**: Microsoft.CodeAnalysis.CSharp.Workspaces.1.2.1\n\n**context**\nThe code in Microsoft.CodeAnalysis.CSharp.Workspaces/Extensions/ParenthesizedExpressionSyntaxExtensions.cs is part of the Simplification feature. The function `bool CanRemoveParentheses(this ParenthesizedExpressionSyntax node)` determines if parentheses can be removed. \n\nAs part of this, the function RemovalChangesAssociation is called (same source file). This function will correctly determine that, for example, the parentheses in `a + (b * c)` can be removed, but not in `a * (b + c)`.\n\n**problem**\nThe problem arises with expressions of the form `a + (b + c)` and `a * (b * c)`. According to this function, the parentheses can be removed. However, that is not correct.\n\nFor example, consider the following code:\n\n```\nclass C\n{\n    public static string operator+(C left, C right) => \"\";\n\n    public static string Problem => \"\" + (new C() + new C());\n}\n```\n\n**expected behavior**\nRemoval of the parenthesis in the `Problem` expression alters the meaning of the expression, so they cannot be removed.\n\n**actual behavior**\nThe current implementation will remove them.\n"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/278517232","html_url":"https://github.com/dotnet/roslyn/issues/11958#issuecomment-278517232","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/11958","id":278517232,"user":{"login":"KrisVandermotten","id":273237,"avatar_url":"https://avatars.githubusercontent.com/u/273237?v=3","gravatar_id":"","url":"https://api.github.com/users/KrisVandermotten","html_url":"https://github.com/KrisVandermotten","followers_url":"https://api.github.com/users/KrisVandermotten/followers","following_url":"https://api.github.com/users/KrisVandermotten/following{/other_user}","gists_url":"https://api.github.com/users/KrisVandermotten/gists{/gist_id}","starred_url":"https://api.github.com/users/KrisVandermotten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrisVandermotten/subscriptions","organizations_url":"https://api.github.com/users/KrisVandermotten/orgs","repos_url":"https://api.github.com/users/KrisVandermotten/repos","events_url":"https://api.github.com/users/KrisVandermotten/events{/privacy}","received_events_url":"https://api.github.com/users/KrisVandermotten/received_events","type":"User","site_admin":false},"created_at":"2017-02-09T01:19:50Z","updated_at":"2017-02-09T01:19:50Z","body":"> Or @KrisVandermotten If you want to dip your toes in here, we're glad to take PRs!\r\n\r\n:-) \r\n\r\nMaybe next time. I trust Dustin on this one ;-)"}}
{"actor":{"display_login":"KrisVandermotten"}}