Skip to content

Commit 2751548

Browse files
committed
library tweaks
1 parent f978017 commit 2751548

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/lib/array.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ arrayshape(T::Type, sz...) = arrayshape(Array{T,length(sz)}, sz...)
2323
@partial Basic getindex(xs::Partial{<:Array}, i::Const...) =
2424
xs.value[map(i -> i.value, i)...]
2525

26+
# TODO needs edges if we implement `setindex!`
27+
@abstract Basic getindex(xs::Partial{<:AbstractArray{T}}, i::Const{<:Integer}...) where T =
28+
xs.value[map(i -> i.value, i)...]
29+
2630
@abstract Basic getindex(xs::AbstractArray{T}, is::Integer...) where T = T
2731

2832
@abstract Basic setindex!(xs::AbstractArray, is...) = xs

src/lib/struct.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ end
6969
x.value[i.value]
7070
end
7171

72-
@partial Basic function getfield(x::Const{T}, i::Const{<:Integer}) where T
72+
@abstract Basic function getfield(x::Const{T}, i::Const{<:Integer}) where T
7373
Const(x.value[i.value])
7474
end
7575

0 commit comments

Comments
 (0)