JuliaPolyhedra / Polyhedra.jl

Polyhedral Computation Interface
Other
172 stars 27 forks source link

Fix inference of iterator mapping #314

Closed blegat closed 1 year ago

blegat commented 1 year ago

On Julia v1.8.3, we have

h1 = intersect(HalfSpace(@SVector([1]), 2))
h2 = intersect(HalfSpace([-1], 3))
h = @inferred h1 * h2

# output

julia> include("tmp.jl")
ERROR: LoadError: return type Polyhedra.Intersection{Int64, Vector{Int64}, Int64} does not match inferred return type Rep

This PR fixes the issue

codecov[bot] commented 1 year ago

Codecov Report

Base: 89.11% // Head: 88.91% // Decreases project coverage by -0.20% :warning:

Coverage data is based on head (c9cd474) compared to base (07567d4). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #314 +/- ## ========================================== - Coverage 89.11% 88.91% -0.21% ========================================== Files 37 37 Lines 3051 3149 +98 ========================================== + Hits 2719 2800 +81 - Misses 332 349 +17 ``` | [Impacted Files](https://codecov.io/gh/JuliaPolyhedra/Polyhedra.jl/pull/314?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaPolyhedra) | Coverage Δ | | |---|---|---| | [src/iterators.jl](https://codecov.io/gh/JuliaPolyhedra/Polyhedra.jl/pull/314/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaPolyhedra#diff-c3JjL2l0ZXJhdG9ycy5qbA==) | `99.24% <100.00%> (+0.01%)` | :arrow_up: | | [src/repelemop.jl](https://codecov.io/gh/JuliaPolyhedra/Polyhedra.jl/pull/314/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaPolyhedra#diff-c3JjL3JlcGVsZW1vcC5qbA==) | `51.06% <0.00%> (-2.79%)` | :arrow_down: | | [src/polyhedra\_to\_lp\_bridge.jl](https://codecov.io/gh/JuliaPolyhedra/Polyhedra.jl/pull/314/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaPolyhedra#diff-c3JjL3BvbHloZWRyYV90b19scF9icmlkZ2Uuamw=) | `59.45% <0.00%> (-2.31%)` | :arrow_down: | | [src/linearity.jl](https://codecov.io/gh/JuliaPolyhedra/Polyhedra.jl/pull/314/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaPolyhedra#diff-c3JjL2xpbmVhcml0eS5qbA==) | `91.53% <0.00%> (-0.27%)` | :arrow_down: | | [src/projection\_opt.jl](https://codecov.io/gh/JuliaPolyhedra/Polyhedra.jl/pull/314/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaPolyhedra#diff-c3JjL3Byb2plY3Rpb25fb3B0Lmps) | `69.44% <0.00%> (-0.26%)` | :arrow_down: | | [src/mixedrep.jl](https://codecov.io/gh/JuliaPolyhedra/Polyhedra.jl/pull/314/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaPolyhedra#diff-c3JjL21peGVkcmVwLmps) | `100.00% <0.00%> (ø)` | | | [src/polyhedron.jl](https://codecov.io/gh/JuliaPolyhedra/Polyhedra.jl/pull/314/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaPolyhedra#diff-c3JjL3BvbHloZWRyb24uamw=) | `100.00% <0.00%> (ø)` | | | [src/triangulation.jl](https://codecov.io/gh/JuliaPolyhedra/Polyhedra.jl/pull/314/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaPolyhedra#diff-c3JjL3RyaWFuZ3VsYXRpb24uamw=) | `100.00% <0.00%> (ø)` | | | [src/doubledescription.jl](https://codecov.io/gh/JuliaPolyhedra/Polyhedra.jl/pull/314/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaPolyhedra#diff-c3JjL2RvdWJsZWRlc2NyaXB0aW9uLmps) | `77.73% <0.00%> (+<0.01%)` | :arrow_up: | | ... and [16 more](https://codecov.io/gh/JuliaPolyhedra/Polyhedra.jl/pull/314/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaPolyhedra) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaPolyhedra). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaPolyhedra)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.