07594e54ac79 — Leonard Ritter a month ago
* reverted last commit
2 files changed, 10 insertions(+), 11 deletions(-)

M src/prover.cpp
M testing/test_borrowing.sc
M src/prover.cpp +6 -7
@@ 751,13 751,12 @@ static SCOPES_RESULT(TypedValueRef) move
     int retdepth, TypedValueRef result, const char *by) {
     SCOPES_RESULT_TYPE(TypedValueRef);
     TypedValues values;
-    if (is_returning_value(result->get_type())) {
-        if (split_return_values(values, result)) {
-            SCOPES_CHECK_RESULT(move_merge_values(ctx, result, retdepth, values, by));
-            result = ref(result.anchor(), ArgumentList::from(values));
-        } else {
-            SCOPES_CHECK_RESULT(move_merge_values(ctx, result, retdepth, values, by));
-        }
+    if (is_returning_value(result->get_type())
+        && split_return_values(values, result)) {
+        SCOPES_CHECK_RESULT(move_merge_values(ctx, result, retdepth, values, by));
+        result = ref(result.anchor(), ArgumentList::from(values));
+    } else {
+        SCOPES_CHECK_RESULT(move_merge_values(ctx, result, retdepth, values, by));
     }
     return result;
 }

          
M testing/test_borrowing.sc +4 -4
@@ 561,8 561,8 @@ do
 
 # regression: return in a do-block or label causes double free
      produces: assertion failed: (_refcount >= 0)
-fn testfunc ()
-    label ok
+#fn testfunc ()
+    #label ok
         label ok2
             merge ok (One 303)
     fn testf ()

          
@@ 573,7 573,7 @@ fn testfunc ()
                     return (One 303)
     testf;
     ;
-testfunc;
-One.test-refcount-balanced;
+#testfunc;
+#One.test-refcount-balanced;
 
 ;
  No newline at end of file