-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
stagedfunction called with Any #8508
Comments
You can throw an error in the staged function if the type is too general for you which will have it fall back to runtime dispatch. |
Ah, useful to document :) |
Related: #8504. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I thought it was guaranteed that staged functions would be called with concrete types, but the following code seems to trick Julia into calling a stagedfunction with
Any
:prints
This behavior is highly sensitive to the structure, if you remove
let
or the assignment tox[i]
, then the function is called correctly withInt
.CC @Keno @timholy
The text was updated successfully, but these errors were encountered: