{"action":"closed","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/5908","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/5908/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/5908/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/5908/events","html_url":"https://github.com/dotnet/corefx/issues/5908","id":131505532,"number":5908,"title":"Interpretter incorrectly handles void TryExpression with non-void parts","user":{"login":"JonHanna","id":1253369,"avatar_url":"https://avatars.githubusercontent.com/u/1253369?v=3","gravatar_id":"","url":"https://api.github.com/users/JonHanna","html_url":"https://github.com/JonHanna","followers_url":"https://api.github.com/users/JonHanna/followers","following_url":"https://api.github.com/users/JonHanna/following{/other_user}","gists_url":"https://api.github.com/users/JonHanna/gists{/gist_id}","starred_url":"https://api.github.com/users/JonHanna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonHanna/subscriptions","organizations_url":"https://api.github.com/users/JonHanna/orgs","repos_url":"https://api.github.com/users/JonHanna/repos","events_url":"https://api.github.com/users/JonHanna/events{/privacy}","received_events_url":"https://api.github.com/users/JonHanna/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Linq.Expressions","name":"System.Linq.Expressions","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":{"login":"VSadov","id":8218165,"avatar_url":"https://avatars.githubusercontent.com/u/8218165?v=3","gravatar_id":"","url":"https://api.github.com/users/VSadov","html_url":"https://github.com/VSadov","followers_url":"https://api.github.com/users/VSadov/followers","following_url":"https://api.github.com/users/VSadov/following{/other_user}","gists_url":"https://api.github.com/users/VSadov/gists{/gist_id}","starred_url":"https://api.github.com/users/VSadov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VSadov/subscriptions","organizations_url":"https://api.github.com/users/VSadov/orgs","repos_url":"https://api.github.com/users/VSadov/repos","events_url":"https://api.github.com/users/VSadov/events{/privacy}","received_events_url":"https://api.github.com/users/VSadov/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/4","html_url":"https://github.com/dotnet/corefx/milestones/1.0.0-rtm","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/4/labels","id":1248719,"number":4,"title":"1.0.0-rtm","description":"Q1 2016 (https://github.com/aspnet/Home/wiki/Roadmap)","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":248,"closed_issues":237,"state":"open","created_at":"2015-08-10T18:04:00Z","updated_at":"2016-02-09T22:29:01Z","due_on":"2016-03-31T07:00:00Z","closed_at":null},"comments":0,"created_at":"2016-02-04T23:29:18Z","updated_at":"2016-02-09T22:29:01Z","closed_at":"2016-02-09T22:29:01Z","body":"It is not necessary for the body and/or catch blocks of a `TryExpression` to match the type of the expression if that type is void (or to look at it another way, all types can be \"assigned\" to void). As such the following is valid:\r\n\r\n```C#\r\nExpression.MakeTry(\r\n    typeof(void),\r\n    Expression.Throw(Expression.Constant(new InvalidOperationException()), typeof(int)),\r\n    null,\r\n    null,\r\n    new[]\r\n    {\r\n        Expression.Catch(typeof(InvalidCastException), Expression.Constant(\"hello\")),\r\n        Expression.Catch(typeof(Exception), Expression.Constant(2.2))\r\n    }\r\n)\r\n```\r\n\r\nThis works fine with the compiler. With the interpreter it unbalances the stack, leaking a value and throwing several asserts in Debug."}}