Skip to content

Commit f5937b4

Browse files
authored
Remove zero arg methods of + and * from linalg tests (JuliaLang#56184)
There are tests elsewhere that i) make sure there is no zero-arg methods of these functions and ii) tests that e.g. `+()` throws a `MethodError`. Without this patch there are test errors whenever the same test process runs both of these tests.
1 parent 8a79822 commit f5937b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/LinearAlgebra/test/matmul.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1139,8 +1139,8 @@ end
11391139
Base.zero(::Thing) = Thing(0.)
11401140
Base.one(::Type{Thing}) = Thing(1.)
11411141
Base.one(::Thing) = Thing(1.)
1142-
Base.:+(t::Thing...) = +(getfield.(t, :data)...)
1143-
Base.:*(t::Thing...) = *(getfield.(t, :data)...)
1142+
Base.:+(t1::Thing, t::Thing...) = +(getfield.((t1, t...), :data)...)
1143+
Base.:*(t1::Thing, t::Thing...) = *(getfield.((t1, t...), :data)...)
11441144

11451145
M = Float64[1 2; 3 4]
11461146
A = Thing.(M)

0 commit comments

Comments
 (0)