{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/1766","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/1766/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/1766/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/1766/events","html_url":"https://github.com/dotnet/roslyn/issues/1766","id":66039194,"number":1766,"title":"VB's SyntaxGenerator.MethodDeclaration does not round-trip on System.Void","user":{"login":"kentcb","id":1901832,"avatar_url":"https://avatars.githubusercontent.com/u/1901832?v=3","gravatar_id":"","url":"https://api.github.com/users/kentcb","html_url":"https://github.com/kentcb","followers_url":"https://api.github.com/users/kentcb/followers","following_url":"https://api.github.com/users/kentcb/following{/other_user}","gists_url":"https://api.github.com/users/kentcb/gists{/gist_id}","starred_url":"https://api.github.com/users/kentcb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentcb/subscriptions","organizations_url":"https://api.github.com/users/kentcb/orgs","repos_url":"https://api.github.com/users/kentcb/repos","events_url":"https://api.github.com/users/kentcb/events{/privacy}","received_events_url":"https://api.github.com/users/kentcb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-IDE","name":"Area-IDE","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Bug","name":"Bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"mavasani","id":10605811,"avatar_url":"https://avatars.githubusercontent.com/u/10605811?v=3","gravatar_id":"","url":"https://api.github.com/users/mavasani","html_url":"https://github.com/mavasani","followers_url":"https://api.github.com/users/mavasani/followers","following_url":"https://api.github.com/users/mavasani/following{/other_user}","gists_url":"https://api.github.com/users/mavasani/gists{/gist_id}","starred_url":"https://api.github.com/users/mavasani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavasani/subscriptions","organizations_url":"https://api.github.com/users/mavasani/orgs","repos_url":"https://api.github.com/users/mavasani/repos","events_url":"https://api.github.com/users/mavasani/events{/privacy}","received_events_url":"https://api.github.com/users/mavasani/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/1","html_url":"https://github.com/dotnet/roslyn/milestones/1.0%20(stable)","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/1/labels","id":937397,"number":1,"title":"1.0 (stable)","description":"This is our 1.0 Milestone. ","creator":{"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},"open_issues":105,"closed_issues":432,"state":"open","created_at":"2015-01-15T20:45:24Z","updated_at":"2015-05-20T00:02:40Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-04-03T00:19:54Z","updated_at":"2015-05-20T08:07:02Z","closed_at":"2015-04-20T18:13:11Z","body":"When passing a return type to VB's `SyntaxGenerator.MethodDeclaration` method, passing a type symbol for `System.Void` results in a `Function` rather than a `Sub`:\r\n\r\n```VB\r\n<Fact>\r\nPublic Sub MethodDeclarationCanRoundTrip()\r\n    Dim tree = VisualBasicSyntaxTree.ParseText(\r\n<x>\r\nPublic Sub Test()\r\nEnd Sub</x>.Value)\r\n    Dim compilation = VisualBasicCompilation.Create(\"AssemblyName\", syntaxTrees:={tree})\r\n    Dim model = compilation.GetSemanticModel(tree)\r\n    Dim node = tree.GetRoot().DescendantNodes().First()\r\n    Dim symbol = CType(model.GetDeclaredSymbol(node), IMethodSymbol)\r\n    VerifySyntax(Of MethodBlockSyntax)(\r\n        _g.MethodDeclaration(\"m\", returnType:=_g.TypeExpression(symbol.ReturnType)),\r\n<x>Sub m()\r\nEnd Sub</x>.Value)\r\nEnd Sub\r\n```\r\n\r\nThis fails with:\r\n\r\n```\r\nExpected: Sub m()\r\n          End Sub\r\nActual:   Function m() As Global.System.Void\r\n          End Function\r\n```"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/103803277","html_url":"https://github.com/dotnet/roslyn/issues/1766#issuecomment-103803277","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/1766","id":103803277,"user":{"login":"mavasani","id":10605811,"avatar_url":"https://avatars.githubusercontent.com/u/10605811?v=3","gravatar_id":"","url":"https://api.github.com/users/mavasani","html_url":"https://github.com/mavasani","followers_url":"https://api.github.com/users/mavasani/followers","following_url":"https://api.github.com/users/mavasani/following{/other_user}","gists_url":"https://api.github.com/users/mavasani/gists{/gist_id}","starred_url":"https://api.github.com/users/mavasani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavasani/subscriptions","organizations_url":"https://api.github.com/users/mavasani/orgs","repos_url":"https://api.github.com/users/mavasani/repos","events_url":"https://api.github.com/users/mavasani/events{/privacy}","received_events_url":"https://api.github.com/users/mavasani/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T08:07:02Z","updated_at":"2015-05-20T08:07:02Z","body":"Verified."}}