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

generated function calls wrong method #20955

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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