JuliaCollections / DataStructures.jl

Julia implementation of Data structures
https://juliacollections.github.io/DataStructures.jl/latest/
MIT License
679 stars 242 forks source link

Fix MutableBinaryHeap{T} when T is Union/abstract #869

Open cmcaine opened 10 months ago

cmcaine commented 10 months ago

Each MutableBinaryHeapNode needs to be explicitly parameterised or they can end up being parameterised by a type that doesn't match the Heap when T is not concrete, and then Julia will (rightly) throw a conversion error when trying to add them to MutableBinaryHeap's nodes field.