Skip to content

Commit

Permalink
Extend Base.eltype to EquationOfState
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti committed Apr 21, 2020
1 parent a97ac6b commit a06fb18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Collections.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a06fb18

Please sign in to comment.