diff options
-rw-r--r-- | src/compiler/ast-tree.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/ast-tree.c b/src/compiler/ast-tree.c index 47b3d54..965fca8 100644 --- a/src/compiler/ast-tree.c +++ b/src/compiler/ast-tree.c @@ -4494,6 +4494,13 @@ bool setTypesAstVariable(AstTreeVariable *variable, .variables = _helper.variables, }; + // previously done + if ((variable->type != NULL && variable->type->type != NULL) && + ((variable->value != NULL && variable->value->type != NULL) || + (variable->initValue != NULL && variable->initValue->type != NULL))) { + return true; + } + if (variable->type != NULL) { if (!setAllTypes(variable->type, helper, NULL, NULL)) { return false; |