Skip to content

Commit 58c2402

Browse files
committed
fix ambiguity for x[] where x is tagged
1 parent dab5ba6 commit 58c2402

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/program_sparsity/hessian.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ function Cassette.overdub(ctx::HessianSparsityContext,
2727
Cassette.overdub(ctx, f, X, map(i->untag(i, ctx), idx)...)
2828
end
2929

30+
# plugs an ambiguity
31+
function Cassette.overdub(ctx::HessianSparsityContext,
32+
f::typeof(getindex),
33+
X::Tagged)
34+
Cassette.recurse(ctx, f, X)
35+
end
36+
3037
function Cassette.overdub(ctx::HessianSparsityContext,
3138
f::typeof(getindex),
3239
X::Tagged,

0 commit comments

Comments
 (0)