Skip to content

Commit 5ce8a7d

Browse files
committed
Fix (newly introduced 😅) ConditionContext method ambiguity
1 parent 28905bc commit 5ce8a7d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/contexts.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ function ConditionContext(values::Union{NamedTuple,AbstractDict})
335335
end
336336
# Optimisation when there are no values to condition on
337337
ConditionContext(::NamedTuple{()}, context::AbstractContext) = context
338+
# Same as above, and avoids method ambiguity with below
339+
ConditionContext(::NamedTuple{()}, context::NamedConditionContext) = context
338340
# Collapse consecutive levels of `ConditionContext`. Note that this overrides
339341
# values inside the child context, thus giving precedence to the outermost
340342
# `ConditionContext`.

0 commit comments

Comments
 (0)