{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/11054","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/11054/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/11054/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/11054/events","html_url":"https://github.com/JuliaLang/julia/issues/11054","id":71891488,"number":11054,"title":"type instability in sqrt?","user":{"login":"spencerlyon2","id":1001948,"avatar_url":"https://avatars.githubusercontent.com/u/1001948?v=3","gravatar_id":"","url":"https://api.github.com/users/spencerlyon2","html_url":"https://github.com/spencerlyon2","followers_url":"https://api.github.com/users/spencerlyon2/followers","following_url":"https://api.github.com/users/spencerlyon2/following{/other_user}","gists_url":"https://api.github.com/users/spencerlyon2/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerlyon2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerlyon2/subscriptions","organizations_url":"https://api.github.com/users/spencerlyon2/orgs","repos_url":"https://api.github.com/users/spencerlyon2/repos","events_url":"https://api.github.com/users/spencerlyon2/events{/privacy}","received_events_url":"https://api.github.com/users/spencerlyon2/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-29T14:29:35Z","updated_at":"2015-04-29T14:33:09Z","closed_at":"2015-04-29T14:33:09Z","body":"Consider the following:\r\n\r\n```\r\njulia> function tester()\r\n       x = 10.0\r\n       sqrt(x)\r\n       end\r\ntester (generic function with 1 method)\r\n\r\njulia> @code_typed tester()\r\n1-element Array{Any,1}:\r\n :($(Expr(:lambda, Any[], Any[Any[:x],Any[Any[:x,Float64,18]],Any[],Any[]], :(begin  # none, line 2:\r\n        x = 10.0 # line 3:\r\n        return (GlobalRef(Base.Math,:box))(Float64,(GlobalRef(Base.Math,:sqrt_llvm))(x::Float64)::Any)::Float64\r\n    end::Float64))))\r\n```\r\n\r\nIs there  a reason for the `Any` above? Given that we have a `DomainError` for negative floating point arguments to `sqrt`,  and we know that `x::Float64`, shouldn't we know that this `Any` should really be `Float64`?"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/97449747","html_url":"https://github.com/JuliaLang/julia/issues/11054#issuecomment-97449747","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/11054","id":97449747,"user":{"login":"jiahao","id":1732,"avatar_url":"https://avatars.githubusercontent.com/u/1732?v=3","gravatar_id":"","url":"https://api.github.com/users/jiahao","html_url":"https://github.com/jiahao","followers_url":"https://api.github.com/users/jiahao/followers","following_url":"https://api.github.com/users/jiahao/following{/other_user}","gists_url":"https://api.github.com/users/jiahao/gists{/gist_id}","starred_url":"https://api.github.com/users/jiahao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiahao/subscriptions","organizations_url":"https://api.github.com/users/jiahao/orgs","repos_url":"https://api.github.com/users/jiahao/repos","events_url":"https://api.github.com/users/jiahao/events{/privacy}","received_events_url":"https://api.github.com/users/jiahao/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T14:33:09Z","updated_at":"2015-04-29T14:33:09Z","body":"You are not reading the output correctly. The entire expression does evaluate to a `Float64` (see the line `end::Float64`)."}}