{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/10926","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/10926/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/10926/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/10926/events","html_url":"https://github.com/JuliaLang/julia/issues/10926","id":69887036,"number":10926,"title":"zero(Type::MathConst) not defined","user":{"login":"caryan","id":1385106,"avatar_url":"https://avatars.githubusercontent.com/u/1385106?v=3","gravatar_id":"","url":"https://api.github.com/users/caryan","html_url":"https://github.com/caryan","followers_url":"https://api.github.com/users/caryan/followers","following_url":"https://api.github.com/users/caryan/following{/other_user}","gists_url":"https://api.github.com/users/caryan/gists{/gist_id}","starred_url":"https://api.github.com/users/caryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caryan/subscriptions","organizations_url":"https://api.github.com/users/caryan/orgs","repos_url":"https://api.github.com/users/caryan/repos","events_url":"https://api.github.com/users/caryan/events{/privacy}","received_events_url":"https://api.github.com/users/caryan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-21T16:11:38Z","updated_at":"2015-04-21T18:44:08Z","closed_at":null,"body":"This shows up when trying to subtract a complex from a MathConst.\r\n\r\n```julia\r\n               _\r\n   _       _ _(_)_     |  A fresh approach to technical computing\r\n  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org\r\n   _ _   _| |_  __ _   |  Type \"help()\" for help.\r\n  | | | | | | |/ _` |  |\r\n  | | |_| | | | (_| |  |  Version 0.4.0-dev+4311 (2015-04-17 03:14 UTC)\r\n _/ |\\__'_|_|_|\\__'_|  |  Commit 58cef56 (4 days old master)\r\n|__/                   |  x86_64-linux-gnu\r\n\r\njulia> π - 1im\r\nERROR: MethodError: `convert` has no method matching convert(::Type{MathConst{:π}}, ::Int64)\r\nThis may have arisen from a call to the constructor MathConst{:π}(...),\r\nsince type constructors fall back to convert methods.\r\nClosest candidates are:\r\n  convert{T<:Real}(::Type{T<:Real}, ::Complex{T<:Real})\r\n  convert{T<:Number}(::Type{T<:Number}, ::Base.Dates.Period)\r\n  convert{R<:Real}(::Type{R<:Real}, ::Base.Dates.DateTime)\r\n  ...\r\n in - at complex.jl:106\r\n\r\njulia> \r\n```\r\n\r\nThe issues stems from [this line](https://github.com/JuliaLang/julia/blob/master/base/complex.jl#L106) in complex.jl which looks for ``zero(MathConst)``.  \r\n\r\nI don't see a clean way around this besides adding a specialization of -(x::MathConst, y::Complex{T}) to constants.jl.  The other option is the always popular \"let's just chuck MathConst out of base.\"\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/94900536","html_url":"https://github.com/JuliaLang/julia/issues/10926#issuecomment-94900536","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/10926","id":94900536,"user":{"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},"created_at":"2015-04-21T18:44:08Z","updated_at":"2015-04-21T18:44:08Z","body":"Int8 is now closed under negation, so I think it might work. Your suggestion here also looks good."}}