From 6ac8fc7fe52c94268e979e08ddd29a06e646b58c Mon Sep 17 00:00:00 2001 From: Jaime Humberto Macias Bustamante Date: Thu, 12 Jun 2025 14:50:31 -0700 Subject: [PATCH] Fixed property access check --- hscript/Parser.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hscript/Parser.hx b/hscript/Parser.hx index 628840c..de7832f 100644 --- a/hscript/Parser.hx +++ b/hscript/Parser.hx @@ -1502,6 +1502,8 @@ class Parser { } switch([get, set]) { case [AGet, ASet] | [AGet, ANever] | [ANever, ASet]: + if(isVar && (expr == null && type == null)) + error(ECustom('Property requires type-hint or initialization'), p1, pmax(expr)); if(expr != null && !isVar) error(ECustom("Attempt to assign on field that is not a real variable"), p1, pmax(expr)); else if(type == null && !isVar)