From 298ec3694a590a245c4328764276e2486fec367f Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 27 Nov 2024 17:24:35 +0000 Subject: [PATCH] Update ext/DynamicPPLTestExt/contexts.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- ext/DynamicPPLTestExt/contexts.jl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ext/DynamicPPLTestExt/contexts.jl b/ext/DynamicPPLTestExt/contexts.jl index a2b0e598c..108af567c 100644 --- a/ext/DynamicPPLTestExt/contexts.jl +++ b/ext/DynamicPPLTestExt/contexts.jl @@ -29,9 +29,15 @@ function DynamicPPL.TestUtils.TestLogModifyingChildContext( ) end -DynamicPPL.NodeTrait(::DynamicPPL.TestUtils.TestLogModifyingChildContext) = DynamicPPL.IsParent() -DynamicPPL.childcontext(context::DynamicPPL.TestUtils.TestLogModifyingChildContext) = context.context -function DynamicPPL.setchildcontext(context::DynamicPPL.TestUtils.TestLogModifyingChildContext, child) +function DynamicPPL.NodeTrait(::DynamicPPL.TestUtils.TestLogModifyingChildContext) + return DynamicPPL.IsParent() +end +function DynamicPPL.childcontext(context::DynamicPPL.TestUtils.TestLogModifyingChildContext) + return context.context +end +function DynamicPPL.setchildcontext( + context::DynamicPPL.TestUtils.TestLogModifyingChildContext, child +) return DynamicPPL.TestUtils.TestLogModifyingChildContext(context.mod, child) end function DynamicPPL.tilde_assume(context::DynamicPPL.TestUtils.TestLogModifyingChildContext, right, vn, vi)