about summary refs log tree commit diff stats
path: root/059shape_shifting_recipe.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-15 01:44:58 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-15 01:44:58 -0800
commit360d45e68edf92e85e3ae7cb198be88182374331 (patch)
tree05fecfe8484d222d79ee68f6255a6bf7f1fa41a9 /059shape_shifting_recipe.cc
parent28ca3dbc71a3c3258bb7876fe1bae7c5edac4438 (diff)
downloadmu-360d45e68edf92e85e3ae7cb198be88182374331.tar.gz
2444
Yet another bugfix as I trace through the last session with Caleb.
Diffstat (limited to '059shape_shifting_recipe.cc')
-rw-r--r--059shape_shifting_recipe.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/059shape_shifting_recipe.cc b/059shape_shifting_recipe.cc
index 2436b924..4ca9779c 100644
--- a/059shape_shifting_recipe.cc
+++ b/059shape_shifting_recipe.cc
@@ -257,6 +257,7 @@ void accumulate_type_ingredients(const string_tree* exemplar_type, const string_
     else {
       if (!deeply_equal_types(get(mappings, exemplar_type->value), refinement_type)) {
         raise_error << maybe(caller_recipe.name) << "no call found for '" << call_instruction.to_string() << "'\n" << end();
+//?         cerr << exemplar_type->value << ": " << debug_string(get(mappings, exemplar_type->value)) << " vs " << debug_string(refinement_type) << '\n';
         *error = true;
         return;
       }
@@ -539,3 +540,14 @@ recipe foo x:address:_elem -> y:address:_elem [
 ]
 +error: foo: failed to map a type to x
 +error: foo: failed to map a type to y
+
+:(scenario specialize_with_literal_5)
+recipe main [
+  foo 3, 4  # recipe mapping two variables to literals
+]
+recipe foo x:_elem, y:_elem [
+  local-scope
+  load-ingredients
+  1:number/raw <- add x, y
+]
++mem: storing 7 in location 1