Skip to content

Commit 42258b5

Browse files
committed
Remove Base.Val(::Static{N}) definition to reduce invalidations.
1 parent e72cfc8 commit 42258b5

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/static.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Base.@pure Static(N::Int) = Static{N}()
1414
Static(N::Integer) = Static(convert(Int, N))
1515
Static(::Static{N}) where {N} = Static{N}()
1616
Static(::Val{N}) where {N} = Static{N}()
17-
Base.Val(::Static{N}) where {N} = Val{N}()
17+
# Base.Val(::Static{N}) where {N} = Val{N}()
1818
Base.convert(::Type{T}, ::Static{N}) where {T<:Number,N} = convert(T, N)
1919
Base.convert(::Type{Static{N}}, ::Static{N}) where {N} = Static{N}()
2020

test/runtests.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,6 @@ using OffsetArrays
336336
@test @inferred(ArrayInterface.offsets(O)) === (4, 8, 11)
337337
@test @inferred(ArrayInterface.offsets(Op)) === (11, 4, 8)
338338

339-
@test @inferred(isnothing(ArrayInterface.size((1,2,3))))
340-
@test @inferred(isnothing(ArrayInterface.strides((1,2,3))))
341339
@test @inferred(ArrayInterface.offsets((1,2,3))) === (Static(1),)
342340
end
343341

0 commit comments

Comments
 (0)