-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
StackOverflow from function definition #31861
Labels
types and dispatch
Types, subtyping and method dispatch
Comments
Very similar to closed issue #31082 |
Also similar I think to issue #26487 (which arose from similar code in the same package). |
Follow-up of a question on Discourse. Perhaps this issue is related to the following StackOverflowError: julia> f(x::T, y::T, z::S) where {S,T<:Vector{S}} = "method 1"
f (generic function with 1 method)
julia> f(x::T, z::S, y::T) where {S,T<:Vector{S}} = "method 2"
ERROR: StackOverflowError:
Stacktrace:
[1] top-level scope at REPL[2]:1
julia> methods(f)
# 2 methods for generic function "f":
[1] f(x::T, y::T, z::S) where {S, T<:Array{S,1}} in Main at REPL[1]:1
[2] f(x::T, z::S, y::T) where {S, T<:Array{S,1}} in Main at REPL[2]:1
julia> f([1,2],1,[1,2])
"method 2"
julia> f([1,2],[1,2],1)
"method 1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is also present in Julia v1.1:
The text was updated successfully, but these errors were encountered: