about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-12-07 16:01:43 -0800
committerKartik K. Agaram <vc@akkartik.com>2017-12-07 16:01:43 -0800
commit20252c5eec133d80d3cf8376fcc03dd17d119b5f (patch)
treec751980325f306a90536fb45f1eab6c94a8d834d
parent07de3e9536fc1f3fc8f8f77f833c4730b6de1b7d (diff)
downloadmu-20252c5eec133d80d3cf8376fcc03dd17d119b5f.tar.gz
4152
-rw-r--r--056shape_shifting_recipe.cc2
-rw-r--r--076continuation.cc11
2 files changed, 12 insertions, 1 deletions
diff --git a/056shape_shifting_recipe.cc b/056shape_shifting_recipe.cc
index edded1b0..bbea9e1e 100644
--- a/056shape_shifting_recipe.cc
+++ b/056shape_shifting_recipe.cc
@@ -92,7 +92,7 @@ bool all_concrete_header_reagents_strictly_match(const instruction& inst, const
       return false;
     }
   }
-  for (int i = 0;  i < min(SIZE(inst.products), SIZE(variant.ingredients));  ++i) {
+  for (int i = 0;  i < min(SIZE(inst.products), SIZE(variant.products));  ++i) {
     if (is_dummy(inst.products.at(i))) continue;
     if (!concrete_type_names_strictly_match(variant.products.at(i), inst.products.at(i))) {
       trace(9993, "transform") << "concrete-type match failed: product " << i << end();
diff --git a/076continuation.cc b/076continuation.cc
index 94c3f97a..32b40d54 100644
--- a/076continuation.cc
+++ b/076continuation.cc
@@ -279,6 +279,17 @@ if (inst.name == "call-with-continuation-mark" && first_ingredient_is_recipe_lit
   return;
 }
 
+:(scenario call_shape_shifting_recipe_with_continuation_mark_and_no_outputs)
+def main [
+  1:continuation <- call-with-continuation-mark f, 34
+]
+def f x:_elem [
+  local-scope
+  load-ingredients
+  return-continuation-until-mark
+]
+$error: 0
+
 //: Ensure that the presence of a continuation keeps its stack frames from being reclaimed.
 
 :(scenario continuations_preserve_local_scopes)