summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-26 02:55:51 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-26 02:55:51 +0000
commite310dbff40e60e878032d59fd7c550398ee34e5d (patch)
tree5ef84fbfaf461e9253e75522a7c8798344358183 /src/analysis
parent2022012d6514578bd53a91b3048d08cf8686e233 (diff)
Fixed duplicate logic and stability issues
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/typecheck.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/analysis/typecheck.c b/src/analysis/typecheck.c
index a0a2df1..e83bb4b 100644
--- a/src/analysis/typecheck.c
+++ b/src/analysis/typecheck.c
@@ -15,6 +15,7 @@ static void tc_error(TypeChecker *tc, Token t, const char *msg)
static void tc_enter_scope(TypeChecker *tc)
{
Scope *s = malloc(sizeof(Scope));
+ if (!s) return;
s->symbols = NULL;
s->parent = tc->current_scope;
tc->current_scope = s;