summaryrefslogtreecommitdiff
path: root/src/compiler/ast-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/ast-tree.c')
-rw-r--r--src/compiler/ast-tree.c7
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;