move calling of recheck out into Resolve step
[scpubgit/DX.git] / lib / DX / Hypothesis.pm
index 931cd0c..202f4ea 100644 (file)
@@ -92,16 +92,15 @@ sub with_resolution {
   my ($self, $prop, $depends, $actions) = @_;
   (my $hyp, my @recheck) = $self->with_actions(@$actions);
   return undef unless $hyp;
-  if (@recheck) {
-    $hyp = $hyp->but_recheck_for(@recheck);
-    return undef unless $hyp;
-  }
-  $hyp->but(
-    resolved_propositions => $self->resolved_propositions
-                                  ->with_resolution_for(
-                                      $prop,
-                                      $depends,
-                                    ),
+  return (
+    $hyp->but(
+      resolved_propositions => $self->resolved_propositions
+                                    ->with_resolution_for(
+                                        $prop,
+                                        $depends,
+                                      ),
+    ),
+    @recheck
   );
 }