diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-11-10 19:19:53 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-11-10 19:19:53 -0800 |
commit | c1585c88fa61918a9c464f7d6eb5b1b4b107048b (patch) | |
tree | df2f317f1b5c4edfe21ebb0d9382e9dc68203521 /036call_reply.cc | |
parent | c4e7c10d158fafb2289b2349a2aebe0459b8946f (diff) | |
download | mu-c1585c88fa61918a9c464f7d6eb5b1b4b107048b.tar.gz |
2417 - support mutable ingredients in headers
If a name repeats between ingredients, we raise an error. If a name repeats across ingredients and products, every call should share the same name across the corresponding ingredients and products.
Diffstat (limited to '036call_reply.cc')
-rw-r--r-- | 036call_reply.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/036call_reply.cc b/036call_reply.cc index 68bc533c..97853a2b 100644 --- a/036call_reply.cc +++ b/036call_reply.cc @@ -67,7 +67,7 @@ case REPLY: { if (ingredient_index >= SIZE(caller_instruction.ingredients)) raise_error << maybe(current_recipe_name()) << "'same-as-ingredient' metadata overflows ingredients in: " << caller_instruction.to_string() << '\n' << end(); if (!is_dummy(caller_instruction.products.at(i)) && caller_instruction.products.at(i).value != caller_instruction.ingredients.at(ingredient_index).value) - raise_error << maybe(current_recipe_name()) << "'same-as-ingredient' product from call to " << callee << " must be " << caller_instruction.ingredients.at(ingredient_index).original_string << " rather than " << caller_instruction.products.at(i).original_string << '\n' << end(); + raise_error << maybe(current_recipe_name()) << "'" << caller_instruction.to_string() << "' should write to " << caller_instruction.ingredients.at(ingredient_index).original_string << " rather than " << caller_instruction.products.at(i).original_string << '\n' << end(); } } // End Reply @@ -117,7 +117,7 @@ recipe test1 [ 10:number <- next-ingredient reply 10:number/same-as-ingredient:0 ] -+error: main: 'same-as-ingredient' product from call to test1 must be 1:number rather than 2:number ++error: main: '2:number <- test1 1:number' should write to 1:number rather than 2:number :(scenario reply_same_as_ingredient_dummy) # % Hide_errors = true; |