{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/17105","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/17105/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/17105/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/17105/events","html_url":"https://github.com/JuliaLang/julia/issues/17105","id":162276763,"number":17105,"title":"Test.atsign-inferred doesn't work on calls using kwargs...","user":{"login":"timholy","id":1525481,"avatar_url":"https://avatars.githubusercontent.com/u/1525481?v=3","gravatar_id":"","url":"https://api.github.com/users/timholy","html_url":"https://github.com/timholy","followers_url":"https://api.github.com/users/timholy/followers","following_url":"https://api.github.com/users/timholy/following{/other_user}","gists_url":"https://api.github.com/users/timholy/gists{/gist_id}","starred_url":"https://api.github.com/users/timholy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timholy/subscriptions","organizations_url":"https://api.github.com/users/timholy/orgs","repos_url":"https://api.github.com/users/timholy/repos","events_url":"https://api.github.com/users/timholy/events{/privacy}","received_events_url":"https://api.github.com/users/timholy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/JuliaLang/julia/labels/intro%20issue","name":"intro issue","color":"0052cc"}],"state":"open","locked":false,"assignee":{"login":"simonster","id":470884,"avatar_url":"https://avatars.githubusercontent.com/u/470884?v=3","gravatar_id":"","url":"https://api.github.com/users/simonster","html_url":"https://github.com/simonster","followers_url":"https://api.github.com/users/simonster/followers","following_url":"https://api.github.com/users/simonster/following{/other_user}","gists_url":"https://api.github.com/users/simonster/gists{/gist_id}","starred_url":"https://api.github.com/users/simonster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonster/subscriptions","organizations_url":"https://api.github.com/users/simonster/orgs","repos_url":"https://api.github.com/users/simonster/repos","events_url":"https://api.github.com/users/simonster/events{/privacy}","received_events_url":"https://api.github.com/users/simonster/received_events","type":"User","site_admin":false},"assignees":[{"login":"simonster","id":470884,"avatar_url":"https://avatars.githubusercontent.com/u/470884?v=3","gravatar_id":"","url":"https://api.github.com/users/simonster","html_url":"https://github.com/simonster","followers_url":"https://api.github.com/users/simonster/followers","following_url":"https://api.github.com/users/simonster/following{/other_user}","gists_url":"https://api.github.com/users/simonster/gists{/gist_id}","starred_url":"https://api.github.com/users/simonster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonster/subscriptions","organizations_url":"https://api.github.com/users/simonster/orgs","repos_url":"https://api.github.com/users/simonster/repos","events_url":"https://api.github.com/users/simonster/events{/privacy}","received_events_url":"https://api.github.com/users/simonster/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-06-25T11:23:30Z","updated_at":"2016-06-29T15:19:31Z","closed_at":null,"body":"...even when the kwargs do not affect the return type in any way. (It's a problem with how the macro is defined.)\r\n\r\n```jl\r\nfunction kwtest(x; str=\"Hello, world!\")\r\n    println(str)\r\n    2x\r\nend\r\n\r\njulia> using Base.Test\r\n\r\njulia> @inferred(kwtest(3))\r\nHello, world!\r\n6\r\n\r\njulia> @inferred(kwtest(3, str=\"Hi there!\"))\r\nERROR: function tuple does not accept keyword arguments\r\n in kwfunc(::Any) at ./boot.jl:236\r\n in eval(::Module, ::Any) at ./boot.jl:234\r\n in macro expansion at ./REPL.jl:92 [inlined]\r\n in (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:46\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/229390021","html_url":"https://github.com/JuliaLang/julia/issues/17105#issuecomment-229390021","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/17105","id":229390021,"user":{"login":"simonster","id":470884,"avatar_url":"https://avatars.githubusercontent.com/u/470884?v=3","gravatar_id":"","url":"https://api.github.com/users/simonster","html_url":"https://github.com/simonster","followers_url":"https://api.github.com/users/simonster/followers","following_url":"https://api.github.com/users/simonster/following{/other_user}","gists_url":"https://api.github.com/users/simonster/gists{/gist_id}","starred_url":"https://api.github.com/users/simonster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonster/subscriptions","organizations_url":"https://api.github.com/users/simonster/orgs","repos_url":"https://api.github.com/users/simonster/repos","events_url":"https://api.github.com/users/simonster/events{/privacy}","received_events_url":"https://api.github.com/users/simonster/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T15:19:31Z","updated_at":"2016-06-29T15:19:31Z","body":"Thinking about this more, it does matter that `gen_call_with_extracted_types` discards the keywords, since it's not actually looking at the keyword version of the function. This applies to `@code_typed` etc. as well. A case that fails:\r\n\r\n```julia\r\nfunction uninferrable_kwtest(x; y=1)\r\n    2x+y\r\nend\r\n```\r\n\r\nType information for `y` is available if this is called as `uninferrable_kwtest(1)` but not if called as `uninferrable_kwtest(1; y=2)`."}}
{"actor":{"display_login":"simonster"}}