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

Callsite @constprop support #48570

Open
aviatesk opened this issue Feb 7, 2023 · 0 comments
Open

Callsite @constprop support #48570

aviatesk opened this issue Feb 7, 2023 · 0 comments
Labels
feature Indicates new feature / enhancement requests

Comments

@aviatesk
Copy link
Member

aviatesk commented Feb 7, 2023

Like the statement @[no]inline support, we can add support for callsite @constprop annotation. That should allow us to something like:

julia> @noinline f_constprop_simple(f, x) = (f(x); Val{x}())
f_constprop_simple (generic function with 1 method)

julia> @test Base.return_types((Function,)) do f
           Base.@constprop :aggressive f_constprop_simple(f, 1)
       end |> only == Val{1}
@nsajko nsajko added the feature Indicates new feature / enhancement requests label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Indicates new feature / enhancement requests
Projects
None yet
Development

No branches or pull requests

2 participants