Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return_type incorrect for opaque closures #41442

Closed
simeonschaub opened this issue Jul 1, 2021 · 2 comments
Closed

return_type incorrect for opaque closures #41442

simeonschaub opened this issue Jul 1, 2021 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior compiler:inference Type inference

Comments

@simeonschaub
Copy link
Member

Union{} is definitely incorrect here:

julia> Core.Compiler.return_type(Base.Experimental.@opaque(x -> x), Tuple{Float64})
Union{}

julia> Base.Experimental.@opaque(x -> x)(1.)
1.0
@simeonschaub simeonschaub added bug Indicates an unexpected problem or unintended behavior compiler:inference Type inference labels Jul 1, 2021
@Moelf
Copy link
Contributor

Moelf commented Oct 30, 2023

it is now Any instead of Union{}, better?

@vtjnash
Copy link
Member

vtjnash commented Oct 30, 2023

Any seems correct there

@vtjnash vtjnash closed this as completed Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior compiler:inference Type inference
Projects
None yet
Development

No branches or pull requests

3 participants