From 9cfd925aa408d32197cfba6ef870f3f45cc6309a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 4 Nov 2015 23:54:14 -0800 Subject: 2362 Now we try to be smarter about checking for presence in the Type array. Still can't get generic duplex-list to work. --- 030container.cc | 2 +- 055parse_tree.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/030container.cc b/030container.cc index 72acd48d..03af439c 100644 --- a/030container.cc +++ b/030container.cc @@ -530,7 +530,7 @@ void check_invalid_types(const recipe_ordinal r) { void check_invalid_types(const type_tree* type, const string& block, const string& name) { if (!type) return; // will throw a more precise error elsewhere // End Container Type Checks - if (type->value && Type.find(type->value) == Type.end()) { + if (type->value && (Type.find(type->value) == Type.end() || Type[type->value].name.empty())) { raise_error << block << "unknown type in " << name << '\n' << end(); } if (type->left) check_invalid_types(type->left, block, name); diff --git a/055parse_tree.cc b/055parse_tree.cc index f71b2e19..1260bf36 100644 --- a/055parse_tree.cc +++ b/055parse_tree.cc @@ -57,6 +57,7 @@ string_tree* parse_string_tree(istream& in) { } :(scenario dilated_reagent_with_type_tree) +% Hide_errors = true; // 'map' isn't defined yet recipe main [ {1: (map (address array character) (list number))} <- copy 34 ] -- cgit 1.4.1-2-gfad0