From a06fb18a8a2346954292e1ac6008ea7dd50666f3 Mon Sep 17 00:00:00 2001 From: singularitti Date: Tue, 21 Apr 2020 18:54:23 -0400 Subject: [PATCH] Extend `Base.eltype` to `EquationOfState` --- src/Collections.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Collections.jl b/src/Collections.jl index b30fe02..6062487 100644 --- a/src/Collections.jl +++ b/src/Collections.jl @@ -696,6 +696,7 @@ end Base.:(==)(x::T, y::T) where {T<:EquationOfState} = all(fieldvalues(x) .== fieldvalues(y)) Base.eltype(::FieldValues{<:EquationOfState{T}}) where {T} = T +Base.eltype(::Type{<:EquationOfState{T}}) where {T} = T function Base.getproperty(eos::EquationOfState, name::Symbol) if name ∈ (:bp0, :bd0)