From 3063b2393aa1f76acdf59736649997da8a21bd84 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 13 Jan 2016 23:20:30 -0800 Subject: 2560 --- 048check_type_by_name.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/048check_type_by_name.cc b/048check_type_by_name.cc index ea4bcba2..4842e15c 100644 --- a/048check_type_by_name.cc +++ b/048check_type_by_name.cc @@ -47,16 +47,14 @@ void deduce_missing_type(map& type, map& type, map& type_name, const reagent& x, const recipe_ordinal r) { if (is_literal(x)) return; - // if you use raw locations you're probably doing something unsafe - if (is_integer(x.name)) return; - if (!x.type) return; // will throw a more precise error elsewhere + if (is_integer(x.name)) return; // if you use raw locations you're probably doing something unsafe + if (!x.type) return; // might get filled in by other logic later if (!contains_key(type, x.name)) { trace(9992, "transform") << x.name << " => " << debug_string(x.type) << end(); type[x.name] = x.type; } - if (!contains_key(type_name, x.name)) { + if (!contains_key(type_name, x.name)) type_name[x.name] = x.properties.at(0).second; - } if (!types_strictly_match(type[x.name], x.type)) raise_error << maybe(get(Recipe, r).name) << x.name << " used with multiple types\n" << end(); } -- cgit 1.4.1-2-gfad0