Skip to content

Commit 1188bca

Browse files
authored
Stricte typing in overloading Base.length
This overloading of `Base.length(::Any)` causes very confusing error messages when `AlgebraicMultigrid.jl` is loaded. (I did not run tests, just editing the file directly on GitHub.)
1 parent 4cabb6d commit 1188bca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/multilevel.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Pinv(A) = Pinv{eltype(A)}(A)
6060

6161
(p::Pinv)(x, b) = mul!(x, p.pinvA, b)
6262

63-
Base.length(ml) = length(ml.levels) + 1
63+
Base.length(ml::MultiLevel) = length(ml.levels) + 1
6464

6565
function Base.show(io::IO, ml::MultiLevel)
6666
op = operator_complexity(ml)

0 commit comments

Comments
 (0)