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

Method dispatch bug involving tuple types #10995

Closed
simonster opened this issue Apr 24, 2015 · 0 comments
Closed

Method dispatch bug involving tuple types #10995

simonster opened this issue Apr 24, 2015 · 0 comments
Assignees
Labels
domain:types and dispatch Types, subtyping and method dispatch kind:bug Indicates an unexpected problem or unintended behavior

Comments

@simonster
Copy link
Member

typealias TupleType{T<:Tuple} Type{T};
f(::Any) = (while false; end; nothing);
f(T::TupleType) = (while false; end; @assert isa(T, TupleType));
g(x) = f(typeof(x));
g((1, 2)) # works if this line is removed
g(UInt8)

The last line yields:

ERROR: AssertionError: isa(T,TupleType)

Tested with 54e9ed1

@simonster simonster added kind:bug Indicates an unexpected problem or unintended behavior domain:types and dispatch Types, subtyping and method dispatch labels Apr 24, 2015
@JeffBezanson JeffBezanson self-assigned this Apr 24, 2015
JeffBezanson added a commit that referenced this issue Apr 27, 2015
mbauman pushed a commit to mbauman/julia that referenced this issue Jun 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:types and dispatch Types, subtyping and method dispatch kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants