Skip to content

generated function calls wrong method #20955

New issue

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

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

Already on GitHub? # to your account

Closed
simonster opened this issue Mar 9, 2017 · 1 comment
Closed

generated function calls wrong method #20955

simonster opened this issue Mar 9, 2017 · 1 comment
Labels
bug Indicates an unexpected problem or unintended behavior regression Regression in behavior compared to a previous version types and dispatch Types, subtyping and method dispatch

Comments

@simonster
Copy link
Member

f{T}(::Type{T}) = false
@generated function g{T}(::Type{T}) f(T) end
f(::Type{String}) = true

julia> g(String)
false

Only happens on master (e596063), not release-0.5, only when g is a generated function, and only when the methods are defined in this order.

@simonster simonster added bug Indicates an unexpected problem or unintended behavior regression Regression in behavior compared to a previous version types and dispatch Types, subtyping and method dispatch labels Mar 9, 2017
@yuyichao
Copy link
Contributor

yuyichao commented Mar 9, 2017

Dup of #19942

@yuyichao yuyichao closed this as completed Mar 9, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Indicates an unexpected problem or unintended behavior regression Regression in behavior compared to a previous version types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

No branches or pull requests

2 participants