{"action":"created","issue":{"url":"https://api.github.com/repos/square/kotlinpoet/issues/442","repository_url":"https://api.github.com/repos/square/kotlinpoet","labels_url":"https://api.github.com/repos/square/kotlinpoet/issues/442/labels{/name}","comments_url":"https://api.github.com/repos/square/kotlinpoet/issues/442/comments","events_url":"https://api.github.com/repos/square/kotlinpoet/issues/442/events","html_url":"https://github.com/square/kotlinpoet/pull/442","id":349691870,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3NzQ4NzIw","number":442,"title":"Add parens for annotated types","user":{"login":"jbolinger","id":4023128,"node_id":"MDQ6VXNlcjQwMjMxMjg=","avatar_url":"https://avatars2.githubusercontent.com/u/4023128?v=4","gravatar_id":"","url":"https://api.github.com/users/jbolinger","html_url":"https://github.com/jbolinger","followers_url":"https://api.github.com/users/jbolinger/followers","following_url":"https://api.github.com/users/jbolinger/following{/other_user}","gists_url":"https://api.github.com/users/jbolinger/gists{/gist_id}","starred_url":"https://api.github.com/users/jbolinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbolinger/subscriptions","organizations_url":"https://api.github.com/users/jbolinger/orgs","repos_url":"https://api.github.com/users/jbolinger/repos","events_url":"https://api.github.com/users/jbolinger/events{/privacy}","received_events_url":"https://api.github.com/users/jbolinger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-11T00:40:37Z","updated_at":"2018-08-11T01:36:16Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/square/kotlinpoet/pulls/442","html_url":"https://github.com/square/kotlinpoet/pull/442","diff_url":"https://github.com/square/kotlinpoet/pull/442.diff","patch_url":"https://github.com/square/kotlinpoet/pull/442.patch"},"body":"Using a `LambdaTypeName` with a receiver type that has an annotation currently produces the following:\r\n\r\n```\r\nfun foo(init: @Marker MyType.() -> Unit)\r\n```\r\n\r\nI think it's useful to wrap it in parens so that the generated code is:\r\n\r\n```\r\nfun foo(init: (@Marker MyType).() -> Unit)\r\n```"},"comment":{"url":"https://api.github.com/repos/square/kotlinpoet/issues/comments/412241982","html_url":"https://github.com/square/kotlinpoet/pull/442#issuecomment-412241982","issue_url":"https://api.github.com/repos/square/kotlinpoet/issues/442","id":412241982,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjI0MTk4Mg==","user":{"login":"jbolinger","id":4023128,"node_id":"MDQ6VXNlcjQwMjMxMjg=","avatar_url":"https://avatars2.githubusercontent.com/u/4023128?v=4","gravatar_id":"","url":"https://api.github.com/users/jbolinger","html_url":"https://github.com/jbolinger","followers_url":"https://api.github.com/users/jbolinger/followers","following_url":"https://api.github.com/users/jbolinger/following{/other_user}","gists_url":"https://api.github.com/users/jbolinger/gists{/gist_id}","starred_url":"https://api.github.com/users/jbolinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbolinger/subscriptions","organizations_url":"https://api.github.com/users/jbolinger/orgs","repos_url":"https://api.github.com/users/jbolinger/repos","events_url":"https://api.github.com/users/jbolinger/events{/privacy}","received_events_url":"https://api.github.com/users/jbolinger/received_events","type":"User","site_admin":false},"created_at":"2018-08-11T01:36:16Z","updated_at":"2018-08-11T01:36:16Z","author_association":"NONE","body":"Yes, for example if the `@Marker` is an annotation for a DslMarker the behavior is different with and without the parens. For a little more detail take a look at this thread: https://discuss.kotlinlang.org/t/scope-control-for-builder-like-dsls/2289/2"}}
{"actor":{"display_login":"jbolinger"}}