Skip to content

Commit 60c7f4d

Browse files
authored
Attempt to fix #262 (#273)
1 parent 50c3637 commit 60c7f4d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/planar/preprocessors.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function _construct_braidingtensors!(ex, preargs, indexmap) # ex is guaranteed t
211211
newargs = Vector{Any}(undef, length(args))
212212
newargs[1] = args[1]
213213
success = true
214-
indices = TO.getindices(ex)
214+
indices = [TO.getindices(arg) for arg in args]
215215
for i in 2:length(ex.args)
216216
indexmapa = copy(indexmap)
217217
newargs[i], successa = _construct_braidingtensors!(args[i], preargs, indexmapa)

test/planar.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,4 +284,13 @@ end
284284

285285
@test tr1 tr2 tr3 tr4 tr5 tr6 tr7
286286
end
287+
@testset "Issue 262" begin
288+
V =^2
289+
A = rand(T, V V)
290+
B = rand(T, V V')
291+
C = rand(T, V' V)
292+
@planar D1[i; j] := A[i; j] + B[i; k] * C[k; j]
293+
@planar D2[i; j] := B[i; k] * C[k; j] + A[i; j]
294+
@test D1 D2
295+
end
287296
end

0 commit comments

Comments
 (0)