about summary refs log tree commit diff stats
path: root/042name.cc
diff options
context:
space:
mode:
Diffstat (limited to '042name.cc')
-rw-r--r--042name.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/042name.cc b/042name.cc
index 2622f41c..7ad45b89 100644
--- a/042name.cc
+++ b/042name.cc
@@ -44,18 +44,20 @@ void transform_names(const recipe_ordinal r) {
     // End transform_names(inst) Special-cases
     // map names to addresses
     for (long long int in = 0; in < SIZE(inst.ingredients); ++in) {
+      if (disqualified(inst.ingredients.at(in), inst, caller.name)) continue;
       if (is_numeric_location(inst.ingredients.at(in))) numeric_locations_used = true;
       if (is_named_location(inst.ingredients.at(in))) names_used = true;
-      if (disqualified(inst.ingredients.at(in), inst, caller.name)) continue;
+      if (is_integer(inst.ingredients.at(in).name)) continue;
       if (!already_transformed(inst.ingredients.at(in), names)) {
         raise_error << maybe(caller.name) << "use before set: " << inst.ingredients.at(in).name << '\n' << end();
       }
       inst.ingredients.at(in).set_value(lookup_name(inst.ingredients.at(in), r));
     }
     for (long long int out = 0; out < SIZE(inst.products); ++out) {
+      if (disqualified(inst.products.at(out), inst, caller.name)) continue;
       if (is_numeric_location(inst.products.at(out))) numeric_locations_used = true;
       if (is_named_location(inst.products.at(out))) names_used = true;
-      if (disqualified(inst.products.at(out), inst, caller.name)) continue;
+      if (is_integer(inst.products.at(out).name)) continue;
       if (names.find(inst.products.at(out).name) == names.end()) {
         trace(9993, "name") << "assign " << inst.products.at(out).name << " " << curr_idx << end();
         names[inst.products.at(out).name] = curr_idx;
@@ -70,12 +72,12 @@ void transform_names(const recipe_ordinal r) {
 
 bool disqualified(/*mutable*/ reagent& x, const instruction& inst, const string& recipe_name) {
   if (!x.type) {
+    // End transform_names Exceptions
     raise_error << maybe(recipe_name) << "missing type for " << x.original_string << " in '" << inst.to_string() << "'\n" << end();
     return true;
   }
   if (is_raw(x)) return true;
   if (is_literal(x)) return true;
-  if (is_integer(x.name)) return true;
   // End Disqualified Reagents
   if (x.initialized) return true;
   return false;