about summary refs log tree commit diff stats
path: root/036call_reply.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-02-24 21:14:24 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-02-24 21:14:24 -0800
commita3f420b61de52fe8cdfa3d90be36648c5913198d (patch)
treea0bf83f37bb87b369583c75636d0d44f8fdc2a96 /036call_reply.cc
parent94c420905a601c28a4c086f050921a8578bce022 (diff)
downloadmu-a3f420b61de52fe8cdfa3d90be36648c5913198d.tar.gz
2699
Diffstat (limited to '036call_reply.cc')
-rw-r--r--036call_reply.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/036call_reply.cc b/036call_reply.cc
index d4bfa085..ab9cebbb 100644
--- a/036call_reply.cc
+++ b/036call_reply.cc
@@ -81,12 +81,12 @@ void check_types_of_reply_instructions(recipe_ordinal r) {
         break;
       }
       for (long long int i = 0; i < SIZE(caller_instruction.products); ++i) {
-        if (!types_coercible(caller_instruction.products.at(i), reply_inst.ingredients.at(i))) {
-          raise_error << maybe(callee.name) << "reply ingredient " << reply_inst.ingredients.at(i).original_string << " can't be saved in " << caller_instruction.products.at(i).original_string << '\n' << end();
-          reagent lhs = reply_inst.ingredients.at(i);
-          canonize_type(lhs);
-          reagent rhs = caller_instruction.products.at(i);
-          canonize_type(rhs);
+        reagent lhs = reply_inst.ingredients.at(i);
+        canonize_type(lhs);
+        reagent rhs = caller_instruction.products.at(i);
+        canonize_type(rhs);
+        if (!types_coercible(rhs, lhs)) {
+          raise_error << maybe(callee.name) << "reply ingredient " << lhs.original_string << " can't be saved in " << rhs.original_string << '\n' << end();
           raise_error << to_string(lhs.type) << " vs " << to_string(rhs.type) << '\n' << end();
           goto finish_reply_check;
         }