diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-10-15 21:12:30 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-10-15 21:12:30 -0700 |
commit | 30c90fc4c79f254c41b4c3ee7dfb3cc505179438 (patch) | |
tree | b3eb2313bb200c3d23a1c0dda9ba8cdb7a8dba44 /030container.cc | |
parent | 392249a76da19cae798998dda198fbe59fbee905 (diff) | |
download | mu-30c90fc4c79f254c41b4c3ee7dfb3cc505179438.tar.gz |
3502
Better implementation of commit 3445: not requiring types for special variables in scenarios. It turned out that it wasn't working anytime we needed to call 'get' on a special variable inside a scenario. After moving that work to an earlier transform we can now use 'filesystem' without a type inside scenarios.
Diffstat (limited to '030container.cc')
-rw-r--r-- | 030container.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/030container.cc b/030container.cc index bc421ac6..3ad38fda 100644 --- a/030container.cc +++ b/030container.cc @@ -874,15 +874,20 @@ void check_or_set_invalid_types(const recipe_ordinal r) { for (int index = 0; index < SIZE(caller.steps); ++index) { instruction& inst = caller.steps.at(index); for (int i = 0; i < SIZE(inst.ingredients); ++i) - check_or_set_invalid_types(inst.ingredients.at(i).type, maybe(caller.name), "'"+inst.original_string+"'"); + check_or_set_invalid_types(inst.ingredients.at(i), caller, inst); for (int i = 0; i < SIZE(inst.products); ++i) - check_or_set_invalid_types(inst.products.at(i).type, maybe(caller.name), "'"+inst.original_string+"'"); + check_or_set_invalid_types(inst.products.at(i), caller, inst); } // End check_or_set_invalid_types } +void check_or_set_invalid_types(reagent& r, const recipe& caller, const instruction& inst) { + // Begin check_or_set_invalid_types(r) + check_or_set_invalid_types(r.type, maybe(caller.name), "'"+inst.original_string+"'"); +} + void check_or_set_invalid_types(type_tree* type, const string& block, const string& name) { - if (!type) return; // will throw a more precise error elsewhere + if (!type) return; // End Container Type Checks if (!type->atom) { check_or_set_invalid_types(type->left, block, name); |