about summary refs log tree commit diff stats
path: root/053recipe_header.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-04-18 18:04:50 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-04-18 18:04:50 -0700
commitf8b0b04da1d63dfb442fa547a82f98f1be14b446 (patch)
tree4f6c24ec8996ab7878caff8bcc90c392826c88e3 /053recipe_header.cc
parent04683e4ecec9bc26f0930a548fc2173d89f686c4 (diff)
downloadmu-f8b0b04da1d63dfb442fa547a82f98f1be14b446.tar.gz
3833
Loosen type-checking slightly to accomodate type abbreviations.
Diffstat (limited to '053recipe_header.cc')
-rw-r--r--053recipe_header.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/053recipe_header.cc b/053recipe_header.cc
index 0f9aa4fc..d9495f46 100644
--- a/053recipe_header.cc
+++ b/053recipe_header.cc
@@ -296,14 +296,18 @@ void check_calls_against_header(const recipe_ordinal r) {
     if (!callee.has_header) continue;
     for (long int i = 0;  i < min(SIZE(inst.ingredients), SIZE(callee.ingredients));  ++i) {
       // ingredients coerced from call to callee
-      if (!types_coercible(callee.ingredients.at(i), inst.ingredients.at(i)))
+      if (!types_coercible(callee.ingredients.at(i), inst.ingredients.at(i))) {
         raise << maybe(caller.name) << "ingredient " << i << " has the wrong type at '" << inst.original_string << "'\n" << end();
+        raise << "  ['" << to_string(callee.ingredients.at(i).type) << "' vs '" << to_string(inst.ingredients.at(i).type) << "']\n" << end();
+      }
     }
     for (long int i = 0;  i < min(SIZE(inst.products), SIZE(callee.products));  ++i) {
       if (is_dummy(inst.products.at(i))) continue;
       // products coerced from callee to call
-      if (!types_coercible(inst.products.at(i), callee.products.at(i)))
+      if (!types_coercible(inst.products.at(i), callee.products.at(i))) {
         raise << maybe(caller.name) << "product " << i << " has the wrong type at '" << inst.original_string << "'\n" << end();
+        raise << "  ['" << to_string(inst.products.at(i).type) << "' vs '" << to_string(callee.products.at(i).type) << "']\n" << end();
+      }
     }
   }
 }