From db1f56c8449d2ea3d158753fe37bac5a750a2566 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 29 Nov 2015 14:18:52 -0800 Subject: 2611 --- html/048check_type_by_name.cc.html | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'html/048check_type_by_name.cc.html') diff --git a/html/048check_type_by_name.cc.html b/html/048check_type_by_name.cc.html index d091ba31..13703a0e 100644 --- a/html/048check_type_by_name.cc.html +++ b/html/048check_type_by_name.cc.html @@ -21,7 +21,6 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } .Delimiter { color: #a04060; } .Special { color: #ff6060; } .CommentedCode { color: #6c6c6c; } -.Todo { color: #000000; background-color: #ffff00; padding-bottom: 1px; } --> @@ -49,11 +48,11 @@ recipe main [ ] +error: main: x used with multiple types -:(before "Transform.push_back(check_or_set_invalid_types)") -Transform.push_back(check_types_by_name); // idempotent +:(after "Begin Instruction Modifying Transforms") +Transform.push_back(check_or_set_types_by_name); // idempotent :(code) -void check_types_by_name(const recipe_ordinal r) { +void check_or_set_types_by_name(const recipe_ordinal r) { trace(9991, "transform") << "--- deduce types for recipe " << get(Recipe, r).name << end(); //? cerr << "--- deduce types for recipe " << get(Recipe, r).name << '\n'; map<string, type_tree*> type; @@ -82,7 +81,6 @@ void deduce_missing_type(map<string(map<string, type_tree*>& type, map<string, string_tree*>& type_name, const reagent& x, const recipe_ordinal r) { if (is_literal(x)) return; - if (is_raw(x)) return; // TODO: delete this // 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 @@ -93,7 +91,7 @@ void check_type(map<string(!contains_key(type_name, x.name)) { type_name[x.name] = x.properties.at(0).second; } - if (!types_match(type[x.name], x.type)) + if (!types_strictly_match(type[x.name], x.type)) raise_error << maybe(get(Recipe, r).name) << x.name << " used with multiple types\n" << end(); } @@ -130,7 +128,7 @@ recipe main [ y:address:charcter <- new character:type *y <- copy 67 ] -+error: main: unknown type in 'y:address:charcter <- new character:type' ++error: main: unknown type charcter in 'y:address:charcter <- new character:type' -- cgit 1.4.1-2-gfad0