Fixed members of script types being unable to reference their type on creation

This commit is contained in:
bigguy345 committed 2025-12-28 23:03:52 +02:00
1 parent 574c893f8d
commit 3a2bcd228f
1 file changed
+4 -3
@@ -382,11 +382,12 @@ public class ScriptDocument {
ScriptTypeInfo scriptType = ScriptTypeInfo.create(
typeName, kind, m.start(), bodyStart, bodyEnd, modifiers);
// Parse fields and methods inside this type
scriptTypes.put(typeName, scriptType);
// Parse fields and methods inside this type AFTER adding the scriptType globally, so its members can reference it
parseScriptTypeMembers(scriptType);
scriptTypes.put(typeName, scriptType);
}
}