Skip to content

Commit

Permalink
Fix (newly introduced 😅) ConditionContext method ambiguity
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Jan 12, 2025
1 parent 92b45d8 commit 218072c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/contexts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ function ConditionContext(values::Union{NamedTuple,AbstractDict})
end
# Optimisation when there are no values to condition on
ConditionContext(::NamedTuple{()}, context::AbstractContext) = context
# Same as above, and avoids method ambiguity with below
ConditionContext(::NamedTuple{()}, context::NamedConditionContext) = context

Check warning on line 340 in src/contexts.jl

View check run for this annotation

Codecov / codecov/patch

src/contexts.jl#L340

Added line #L340 was not covered by tests
# Collapse consecutive levels of `ConditionContext`. Note that this overrides
# values inside the child context, thus giving precedence to the outermost
# `ConditionContext`.
Expand Down

0 comments on commit 218072c

Please sign in to comment.