{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/7357","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/7357/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/7357/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/7357/events","html_url":"https://github.com/JuliaLang/julia/issues/7357","id":36233218,"number":7357,"title":"dispatch behavior of optional arguments","user":{"login":"nalimilan","id":1120448,"avatar_url":"https://avatars.githubusercontent.com/u/1120448?v=3","gravatar_id":"","url":"https://api.github.com/users/nalimilan","html_url":"https://github.com/nalimilan","followers_url":"https://api.github.com/users/nalimilan/followers","following_url":"https://api.github.com/users/nalimilan/following{/other_user}","gists_url":"https://api.github.com/users/nalimilan/gists{/gist_id}","starred_url":"https://api.github.com/users/nalimilan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nalimilan/subscriptions","organizations_url":"https://api.github.com/users/nalimilan/orgs","repos_url":"https://api.github.com/users/nalimilan/repos","events_url":"https://api.github.com/users/nalimilan/events{/privacy}","received_events_url":"https://api.github.com/users/nalimilan/received_events","type":"User","site_admin":false},"labels":[{"id":1363386,"url":"https://api.github.com/repos/JuliaLang/julia/labels/breaking","name":"breaking","color":"800000","default":false},{"id":210700,"url":"https://api.github.com/repos/JuliaLang/julia/labels/decision","name":"decision","color":"F08000","default":false},{"id":171886684,"url":"https://api.github.com/repos/JuliaLang/julia/labels/types%20and%20dispatch","name":"types and dispatch","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/JuliaLang/julia/milestones/20","html_url":"https://github.com/JuliaLang/julia/milestones/0.6.0","labels_url":"https://api.github.com/repos/JuliaLang/julia/milestones/20/labels","id":1298021,"number":20,"title":"0.6.0","description":"","creator":{"login":"JeffBezanson","id":744556,"avatar_url":"https://avatars.githubusercontent.com/u/744556?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffBezanson","html_url":"https://github.com/JeffBezanson","followers_url":"https://api.github.com/users/JeffBezanson/followers","following_url":"https://api.github.com/users/JeffBezanson/following{/other_user}","gists_url":"https://api.github.com/users/JeffBezanson/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffBezanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffBezanson/subscriptions","organizations_url":"https://api.github.com/users/JeffBezanson/orgs","repos_url":"https://api.github.com/users/JeffBezanson/repos","events_url":"https://api.github.com/users/JeffBezanson/events{/privacy}","received_events_url":"https://api.github.com/users/JeffBezanson/received_events","type":"User","site_admin":false},"open_issues":166,"closed_issues":58,"state":"open","created_at":"2015-09-09T16:35:16Z","updated_at":"2016-11-10T18:51:23Z","due_on":"2017-01-31T00:00:00Z","closed_at":null},"comments":41,"created_at":"2014-06-21T22:22:08Z","updated_at":"2016-11-10T19:20:01Z","closed_at":null,"body":"Since empty arrays `[]` are of type `Vector{None}`, it will sometimes happen that people do mistakes like this:\n\n``` julia\njulia> function f1(x::Vector{Int} = [])\n           true\n       end\nf1 (generic function with 3 methods)\n\njulia> function f2(; x::Vector{Int} = [])\n           true\n       end\nf2 (generic function with 1 method)\n\njulia> f1()\nERROR: no method f1(Array{None,1})\n in f1 at none:2\n\njulia> f2()\nERROR: no method __f2#3__(Array{None,1})\n```\n\nAt least, in the second case, the function name is a bit weird. In the first case, the line number doesn't correspond to anything interesting. If it's possible, it would be great to print a more explicit message, like \"default argument value is of an incorrect type\".\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/259781740","html_url":"https://github.com/JuliaLang/julia/issues/7357#issuecomment-259781740","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/7357","id":259781740,"user":{"login":"StefanKarpinski","id":153596,"avatar_url":"https://avatars.githubusercontent.com/u/153596?v=3","gravatar_id":"","url":"https://api.github.com/users/StefanKarpinski","html_url":"https://github.com/StefanKarpinski","followers_url":"https://api.github.com/users/StefanKarpinski/followers","following_url":"https://api.github.com/users/StefanKarpinski/following{/other_user}","gists_url":"https://api.github.com/users/StefanKarpinski/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanKarpinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanKarpinski/subscriptions","organizations_url":"https://api.github.com/users/StefanKarpinski/orgs","repos_url":"https://api.github.com/users/StefanKarpinski/repos","events_url":"https://api.github.com/users/StefanKarpinski/events{/privacy}","received_events_url":"https://api.github.com/users/StefanKarpinski/received_events","type":"User","site_admin":false},"created_at":"2016-11-10T19:20:01Z","updated_at":"2016-11-10T19:20:01Z","body":"This is technically a breaking change but is unlikely to break any sane code."}}
{"actor":{"display_login":"StefanKarpinski"}}