-
Notifications
You must be signed in to change notification settings - Fork 35
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
@interpret fails for Zygote and eltype
#476
Comments
So the MWE here is something like
which seems like a weird function to write anyways (in Zygote it's generated somewhere here). diff --git a/src/interpret.jl b/src/interpret.jl
index ba26275..089e4a7 100644
--- a/src/interpret.jl
+++ b/src/interpret.jl
@@ -421,6 +421,8 @@ function check_isdefined(frame, @nospecialize(node))
return isdefined(node.mod, node.name)
elseif isa(node, Symbol)
return isdefined(moduleof(frame), node)
+ elseif isa(node, QuoteNode)
+ return isdefined(moduleof(frame), Symbol(node.value))
end
error("unrecognized isdefined node ", node)
end is a possible fix, but I don't know if it actually makes sense... |
simeonschaub
added a commit
that referenced
this issue
Apr 22, 2021
I think the right return value here would just be |
simeonschaub
added a commit
that referenced
this issue
Apr 22, 2021
simeonschaub
added a commit
that referenced
this issue
Apr 22, 2021
Oh wow, that was quick! Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Came across the following issue:
Not clear to me if this is Zygote doing something weird or if this is JuliaInterpreter lacking a support for this particular case.
Anyways, hope this is useful!
Packages
The text was updated successfully, but these errors were encountered: