Skip to content

Commit

Permalink
Fix type instabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Nov 27, 2023
1 parent b1a0b10 commit 437e25a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/caching.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function Base.get!(f::Function, cache::CGCCache{T, N}, key::NTuple{3,SUNIrrep{N}
start, stop = cache.offsets[key]
fn = cache_path(N, T)
return open(fn, "r") do io
return load_disk_cache_entry(io, start, stop)
return load_disk_cache_entry(io, start, stop)::SparseArray{T,4}

Check warning on line 30 in src/caching.jl

View check run for this annotation

Codecov / codecov/patch

src/caching.jl#L27-L30

Added lines #L27 - L30 were not covered by tests
end
else
return f()
Expand Down
2 changes: 1 addition & 1 deletion src/clebschgordan.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ end

CGC(s1::I, s2::I, s3::I) where {I<:SUNIrrep} = CGC(Float64, s1, s2, s3)
function CGC(::Type{T}, s1::SUNIrrep{N}, s2::SUNIrrep{N}, s3::SUNIrrep{N}) where {T,N}
cache = get!(CGC_CACHES, (N,T), CGCCache{T,N}())
cache = get!(CGC_CACHES, (N,T), CGCCache{T,N}())::CGCCache{T,N}
return get!(cache, (s1, s2, s3)) do
return _CGC(T, s1, s2, s3)
end
Expand Down

0 comments on commit 437e25a

Please sign in to comment.