Skip to content

Commit 079797c

Browse files
committed
[Utilities] add fallbacks for scalar_type and vector_type
1 parent 57d0f65 commit 079797c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Utilities/functions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ end
592592
Type of functions obtained by indexing objects obtained by calling `eachscalar`
593593
on functions of type `F`.
594594
"""
595-
function scalar_type end
595+
scalar_type(::Type{F}) where {F} = Any # A default fallback
596596

597597
scalar_type(::Type{<:AbstractVector{T}}) where {T} = T
598598

@@ -614,7 +614,7 @@ scalar_type(::Type{MOI.VectorNonlinearFunction}) = MOI.ScalarNonlinearFunction
614614
Return the [`MOI.AbstractVectorFunction`](@ref) associated with the scalar type
615615
`F`.
616616
"""
617-
function vector_type end
617+
vector_type(::Type{F}) where {F} = Any # A default fallback
618618

619619
vector_type(::Type{T}) where {T} = Vector{T}
620620

0 commit comments

Comments
 (0)