about summary refs log tree commit diff stats
path: root/028call_return.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-04-27 09:07:53 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-04-27 09:07:53 -0700
commitb8263692a6f2865482abbc21eae5a4e5163ab725 (patch)
treeb1b938d4a83cf2b420001c9188194a5800d12eb2 /028call_return.cc
parentf6645643953eeb0a493d258759a4421505d13539 (diff)
downloadmu-b8263692a6f2865482abbc21eae5a4e5163ab725.tar.gz
3841
Use the real original instruction in error messages.
Thanks Ella Couch.
Diffstat (limited to '028call_return.cc')
-rw-r--r--028call_return.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/028call_return.cc b/028call_return.cc
index 3e547f06..2b3b3904 100644
--- a/028call_return.cc
+++ b/028call_return.cc
@@ -93,16 +93,16 @@ void check_types_of_return_instructions(const recipe_ordinal r) {
         if (has_property(return_inst.ingredients.at(i), "same-as-ingredient")) {
           string_tree* tmp = property(return_inst.ingredients.at(i), "same-as-ingredient");
           if (!tmp || !tmp->atom) {
-            raise << maybe(caller.name) << "'same-as-ingredient' metadata should take exactly one value in '" << to_original_string(return_inst) << "'\n" << end();
+            raise << maybe(caller.name) << "'same-as-ingredient' metadata should take exactly one value in '" << return_inst.original_string << "'\n" << end();
             goto finish_return_check;
           }
           int ingredient_index = to_integer(tmp->value);
           if (ingredient_index >= SIZE(caller_instruction.ingredients)) {
-            raise << maybe(caller.name) << "too few ingredients in '" << to_original_string(caller_instruction) << "'\n" << end();
+            raise << maybe(caller.name) << "too few ingredients in '" << caller_instruction.original_string << "'\n" << end();
             goto finish_return_check;
           }
           if (!is_dummy(caller_instruction.products.at(i)) && !is_literal(caller_instruction.ingredients.at(ingredient_index)) && caller_instruction.products.at(i).name != caller_instruction.ingredients.at(ingredient_index).name) {
-            raise << maybe(caller.name) << "'" << to_original_string(caller_instruction) << "' should write to '" << caller_instruction.ingredients.at(ingredient_index).original_string << "' rather than '" << caller_instruction.products.at(i).original_string << "'\n" << end();
+            raise << maybe(caller.name) << "'" << caller_instruction.original_string << "' should write to '" << caller_instruction.ingredients.at(ingredient_index).original_string << "' rather than '" << caller_instruction.products.at(i).original_string << "'\n" << end();
           }
         }
       }