diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-01-13 23:20:30 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-01-13 23:20:30 -0800 |
commit | 3063b2393aa1f76acdf59736649997da8a21bd84 (patch) | |
tree | ee207363878b19187eb523229e20c258ff239ea4 | |
parent | 802283e450b7a8b14b1730358ecb9473ef074147 (diff) | |
download | mu-3063b2393aa1f76acdf59736649997da8a21bd84.tar.gz |
2560
-rw-r--r-- | 048check_type_by_name.cc | 8 |
1 files 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<string, type_tree*>& type, map<string, string_tree* void check_type(map<string, type_tree*>& type, map<string, string_tree*>& 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(); } |