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

New ambiguity in Julia 1.3 #187

Closed
KristofferC opened this issue Sep 20, 2019 · 3 comments · Fixed by #188
Closed

New ambiguity in Julia 1.3 #187

KristofferC opened this issue Sep 20, 2019 · 3 comments · Fixed by #188
Assignees

Comments

@KristofferC
Copy link

While running the package tests for the upcoming 1.3, a new ambiguity in "HybridSystems.jl" was detected but it seems to originate from this package:

Switched System: Error During Test at /root/.julia/packages/HybridSystems/Ym91d/test/runtests.jl:8
  Got exception outside of a @test
  MethodError: convexhull(::Array{Int64,1}, ::Array{Int64,1}, ::Array{Int64,1}, ::Array{Int64,1}) is ambiguous. Candidates:
    convexhull(ps::AbstractArray{T,1} where T...) in Polyhedra at /root/.julia/packages/Polyhedra/opCEk/src/repop.jl:67
    convexhull(p1::Union{AbstractArray{T,1}, Polyhedron{T}, VRepresentation{T}, Union{Line{T,AT}, Ray{T,AT}} where AT}, p2::Union{AbstractArray{T,1}, Polyhedron{T}, VRepresentation{T}, Union{Line{T,AT}, Ray{T,AT}} where AT}, ps::Union{AbstractArray{T,1}, Polyhedron{T}, VRepresentation{T}, Union{Line{T,AT}, Ray{T,AT}} where AT}...) where T in Polyhedra at /root/.julia/packages/Polyhedra/opCEk/src/repop.jl:74
    convexhull(ps::AbstractArray{T,1} where T...) in Polyhedra at /root/.julia/packages/Polyhedra/opCEk/src/repop.jl:67
  Possible fix, define
    convexhull(::Vararg{AbstractArray{T,1} where T,N} where N)

We believe this is a real ambiguity that got detected due to improvements in the Julia type system and thus needs to be fixed in this package.

@schillic
Copy link
Contributor

Here is another one for v1.3-rc2:

julia> using Polyhedra

julia> P = vrep([[0.0, 0.0]], d=2);

julia> Q = polyhedron(P);

julia> intersect(Q, Q)
ERROR: MethodError: intersect(::DefaultPolyhedron{Float64,Polyhedra.Intersection{Float64,Array{Float64,1},Int64},Polyhedra.Hull{Float64,Array{Float64,1},Int64}}, ::DefaultPolyhedron{Float64,Polyhedra.Intersection{Float64,Array{Float64,1},Int64},Polyhedra.Hull{Float64,Array{Float64,1},Int64}}) is ambiguous. Candidates:
  intersect(p::Union{HRepresentation{T}, Polyhedron{T}} where T...) in Polyhedra at /Polyhedra/opCEk/src/repop.jl:19
  intersect(p1::Union{HRepresentation{T}, Polyhedron{T}, HRepElement{T,AT} where AT}, p2::Union{HRepresentation{T}, Polyhedron{T}, HRepElement{T,AT} where AT}, ps::Union{HRepresentation{T}, Polyhedron{T}, HRepElement{T,AT} where AT}...) where T in Polyhedra at /Polyhedra/opCEk/src/repop.jl:29
Possible fix, define
  intersect(::Vararg{Union{HRepresentation{T}, Polyhedron{T}} where T,N} where N)

@blegat
Copy link
Member

blegat commented Sep 20, 2019

@KristofferC Isn't it weird that the first and third method in #187 (comment) are exactly the same ?

@KristofferC
Copy link
Author

Yes, see JuliaLang/julia#33166.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants