-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix return value of typeinf_code
for code == nothing
#20068
Conversation
that seems to do it: @generated function construct_similar{FSA <: Tuple}(::Type{FSA}, elements::Tuple)
:(FSA)
end
code_typed(construct_similar, (DataType, Tuple{Int, Int})) |
thanks! :) |
6c96923
to
d129379
Compare
Is it possible to trigger this without |
I seem to be only able to trigger that code-path with |
d129379
to
a9949be
Compare
@vtjnash ok to merge? |
@generated function foo20067{T <: Tuple}(::Type{T}, elements::Tuple) | ||
:(T) | ||
end | ||
code_typed(DevNull, foo20067, (DataType, Tuple{Int, Int})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no 3-argument code_typed
. Unfortunately this test failure was masked by #20027.
It would also be better if there were a @test
in here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inference also fails here, I believe because it doesn't want to call the generated function on an abstract type (Type{T} where T<:Tuple
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that, I noticed that and then promptly forgot to fix it...
It might be best to remove the test for now. #20146
remove erroneous test for #20068
Fixes #20067
@SimonDanisch what was the example that triggered this? Would be good as a test case.