Skip to content

Commit a486f64

Browse files
committed
Add eltype(::Static)
1 parent ed85b75 commit a486f64

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/static.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ end
3333
Base.promote_rule(::Type{<:Static}, ::Type{<:Static}) = Int
3434
Base.:(%)(::Static{N}, ::Type{Integer}) where {N} = N
3535

36+
Base.eltype(::Type{T}) where {T<:Static} = Int
3637
Base.iszero(::Static{0}) = true
3738
Base.iszero(::Static) = false
3839
Base.isone(::Static{1}) = true

0 commit comments

Comments
 (0)