diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-12 21:01:07 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-12 21:09:47 -0700 |
commit | f8aa4b17efed4f56b0c023cf40eb6d6000be1748 (patch) | |
tree | c12c7398392ec7ee912b61024b3480f44250c567 | |
parent | 957ca9c955751d4454e7b4095f903eead9b678cc (diff) | |
download | mu-f8aa4b17efed4f56b0c023cf40eb6d6000be1748.tar.gz |
2270
Thanks Caleb Couch.
-rw-r--r-- | 022arithmetic.cc | 4 | ||||
-rw-r--r-- | 032array.cc | 2 | ||||
-rw-r--r-- | 033exclusive_container.cc | 2 | ||||
-rw-r--r-- | 042name.cc | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/022arithmetic.cc b/022arithmetic.cc index 16fab86c..e5de41ec 100644 --- a/022arithmetic.cc +++ b/022arithmetic.cc @@ -243,11 +243,11 @@ Recipe_ordinal["divide-with-remainder"] = DIVIDE_WITH_REMAINDER; :(before "End Primitive Recipe Checks") case DIVIDE_WITH_REMAINDER: { if (SIZE(inst.ingredients) != 2) { - raise_error << maybe(current_recipe_name()) << "'divide-with-remainder' requires exactly two ingredients, but got '" << current_instruction().to_string() << "'\n" << end(); + raise_error << maybe(Recipe[r].name) << "'divide-with-remainder' requires exactly two ingredients, but got '" << inst.to_string() << "'\n" << end(); break; } if (!is_mu_number(inst.ingredients.at(0)) || !is_mu_number(inst.ingredients.at(1))) { - raise_error << maybe(current_recipe_name()) << "'divide-with-remainder' requires number ingredients, but got '" << current_instruction().to_string() << "'\n" << end(); + raise_error << maybe(Recipe[r].name) << "'divide-with-remainder' requires number ingredients, but got '" << inst.to_string() << "'\n" << end(); break; } if (SIZE(inst.products) > 2) { diff --git a/032array.cc b/032array.cc index 1a1b2d17..1d64ff90 100644 --- a/032array.cc +++ b/032array.cc @@ -276,7 +276,7 @@ case INDEX_ADDRESS: { reagent base = inst.ingredients.at(0); canonize_type(base); if (!is_mu_array(base)) { - raise_error << current_recipe_name () << "'index-address' on a non-array " << base.original_string << '\n' << end(); + raise_error << maybe(Recipe[r].name) << "'index-address' on a non-array " << base.original_string << '\n' << end(); break; } if (inst.products.empty()) break; diff --git a/033exclusive_container.cc b/033exclusive_container.cc index 388a4f4f..1f591acd 100644 --- a/033exclusive_container.cc +++ b/033exclusive_container.cc @@ -90,7 +90,7 @@ case MAYBE_CONVERT: { reagent base = inst.ingredients.at(0); canonize_type(base); if (base.types.empty() || Type[base.types.at(0)].kind != exclusive_container) { - raise_error << current_recipe_name () << "first ingredient of 'maybe-convert' should be an exclusive-container, but got " << base.original_string << '\n' << end(); + raise_error << maybe(Recipe[r].name) << "first ingredient of 'maybe-convert' should be an exclusive-container, but got " << base.original_string << '\n' << end(); break; } if (!is_literal(inst.ingredients.at(1))) { diff --git a/042name.cc b/042name.cc index 99fda76c..37544955 100644 --- a/042name.cc +++ b/042name.cc @@ -234,7 +234,7 @@ recipe main [ // convert variant names of exclusive containers if (inst.operation == Recipe_ordinal["maybe-convert"]) { if (SIZE(inst.ingredients) != 2) { - raise_error << maybe(Recipe[r].name) << "exactly 2 ingredients expected in '" << current_instruction().to_string() << "'\n" << end(); + raise_error << maybe(Recipe[r].name) << "exactly 2 ingredients expected in '" << inst.to_string() << "'\n" << end(); break; } assert(is_literal(inst.ingredients.at(1))); |