about summary refs log tree commit diff stats
path: root/056recipe_header.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-10-29 17:15:09 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-10-29 17:15:09 -0700
commite6692482643dc007988188e2b19fbb9219ca2833 (patch)
treecbb805cba3bd46dfc7d71adaa2150d9acb5cc5ba /056recipe_header.cc
parent5a702544a6f8aa3fa520ba387a6c0e803e076476 (diff)
downloadmu-e6692482643dc007988188e2b19fbb9219ca2833.tar.gz
2321 - more preparations for static dispatch
Deduce operation id from name during transform rather than load, so that
earlier transforms have a chance to modify the name.
Diffstat (limited to '056recipe_header.cc')
-rw-r--r--056recipe_header.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/056recipe_header.cc b/056recipe_header.cc
index 89ad945e..2ba0ac4b 100644
--- a/056recipe_header.cc
+++ b/056recipe_header.cc
@@ -65,14 +65,14 @@ if (curr.name == "load-ingredients") {
 
 :(scenarios transform)
 :(scenario recipe_headers_are_checked)
-% Hide_warnings = true;
+% Hide_errors = true;
 recipe add2 x:number, y:number -> z:number [
   local-scope
   load-ingredients
   z:address:number <- copy 0/raw
   reply z
 ]
-+warn: add2: replied with the wrong type at 'reply z'
++error: add2: replied with the wrong type at 'reply z'
 
 :(before "End One-time Setup")
   Transform.push_back(check_header_products);
@@ -86,11 +86,11 @@ void check_header_products(const recipe_ordinal r) {
     const instruction& inst = rr.steps.at(i);
     if (inst.operation != REPLY) continue;
     if (SIZE(rr.products) != SIZE(inst.ingredients)) {
-      raise << maybe(rr.name) << "tried to reply the wrong number of products in '" << inst.to_string() << "'\n" << end();
+      raise_error << maybe(rr.name) << "tried to reply the wrong number of products in '" << inst.to_string() << "'\n" << end();
     }
     for (long long int i = 0; i < SIZE(rr.products); ++i) {
       if (!types_match(rr.products.at(i), inst.ingredients.at(i))) {
-        raise << maybe(rr.name) << "replied with the wrong type at '" << inst.to_string() << "'\n" << end();
+        raise_error << maybe(rr.name) << "replied with the wrong type at '" << inst.to_string() << "'\n" << end();
       }
     }
   }