{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/Compat.jl/issues/233","repository_url":"https://api.github.com/repos/JuliaLang/Compat.jl","labels_url":"https://api.github.com/repos/JuliaLang/Compat.jl/issues/233/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/Compat.jl/issues/233/comments","events_url":"https://api.github.com/repos/JuliaLang/Compat.jl/issues/233/events","html_url":"https://github.com/JuliaLang/Compat.jl/issues/233","id":162301274,"number":233,"title":"Issue with Julia 0.5-style call syntax","user":{"login":"tkoolen","id":2585880,"avatar_url":"https://avatars.githubusercontent.com/u/2585880?v=3","gravatar_id":"","url":"https://api.github.com/users/tkoolen","html_url":"https://github.com/tkoolen","followers_url":"https://api.github.com/users/tkoolen/followers","following_url":"https://api.github.com/users/tkoolen/following{/other_user}","gists_url":"https://api.github.com/users/tkoolen/gists{/gist_id}","starred_url":"https://api.github.com/users/tkoolen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkoolen/subscriptions","organizations_url":"https://api.github.com/users/tkoolen/orgs","repos_url":"https://api.github.com/users/tkoolen/repos","events_url":"https://api.github.com/users/tkoolen/events{/privacy}","received_events_url":"https://api.github.com/users/tkoolen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-25T21:51:09Z","updated_at":"2016-06-25T22:49:35Z","closed_at":"2016-06-25T22:03:14Z","body":"I found an issue with the handling of Julia 0.5-style call overloading. See example below:\r\n\r\n```julia\r\nusing Compat\r\n\r\nimmutable Functor\r\n    a::Int64\r\nend\r\n\r\nget(f::Functor) = f.a\r\n#@compat (f::Functor)() = f.a # fine\r\n@compat (f::Functor)() = get(f.a) # error\r\n```\r\n\r\nThe error I'm getting on 0.4.5 is:\r\n```\r\nERROR: LoadError: BoundsError: attempt to access 2-element Array{Any,1}:\r\n :get  \r\n :(f.a)\r\n  at index [3]\r\n in include at /opt/homebrew-cask/Caskroom/julia/0.4.5/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib\r\n in include_from_node1 at /opt/homebrew-cask/Caskroom/julia/0.4.5/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib\r\n in process_options at /opt/homebrew-cask/Caskroom/julia/0.4.5/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib\r\n in _start at /opt/homebrew-cask/Caskroom/julia/0.4.5/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib\r\nwhile loading <path>/julia/RigidBodyDynamicsSim/src/compatfail.jl, in expression starting on line 10\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/Compat.jl/issues/comments/228574415","html_url":"https://github.com/JuliaLang/Compat.jl/issues/233#issuecomment-228574415","issue_url":"https://api.github.com/repos/JuliaLang/Compat.jl/issues/233","id":228574415,"user":{"login":"tkoolen","id":2585880,"avatar_url":"https://avatars.githubusercontent.com/u/2585880?v=3","gravatar_id":"","url":"https://api.github.com/users/tkoolen","html_url":"https://github.com/tkoolen","followers_url":"https://api.github.com/users/tkoolen/followers","following_url":"https://api.github.com/users/tkoolen/following{/other_user}","gists_url":"https://api.github.com/users/tkoolen/gists{/gist_id}","starred_url":"https://api.github.com/users/tkoolen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkoolen/subscriptions","organizations_url":"https://api.github.com/users/tkoolen/orgs","repos_url":"https://api.github.com/users/tkoolen/repos","events_url":"https://api.github.com/users/tkoolen/events{/privacy}","received_events_url":"https://api.github.com/users/tkoolen/received_events","type":"User","site_admin":false},"created_at":"2016-06-25T22:49:35Z","updated_at":"2016-06-25T22:49:35Z","body":"Ah, you're right, thanks."}}
{"actor":{"display_login":"tkoolen"}}