Skip to content

[FIX] Fix duplicating static fields not showing an error - #568

Merged
AbnormalPoof merged 1 commit into
FunkinCrew:developfrom
ahmed7p:fix-duplicate
Oct 23, 2026
Merged

AbnormalPoof merged 1 commit into
FunkinCrew:developfrom
ahmed7p:fix-duplicate

Conversation

@ahmed7p

@ahmed7p ahmed7p commented Oct 22, 2026 •

Copy link
Copy Markdown

Description

This PR fixes an issue where declaring duplicate static fields (or a mix of static and instance fields with the same name) during script parsing did not throw an error.

Changed

  • Before: Having multiple static fields or a static field and an instance field with the same name inside a script class would silently pass without throwing any parse error.
  • Now: Any duplicate field declaration (whether static or instance) is caught immediately during parse time (Parser.hx) and throws a proper parser error.

Key Changes

  • Added duplicate name validation in Parser.hx.
  • Cleaned up the redundant runtime check in PolymodScriptClass.hx.

@AbnormalPoof
AbnormalPoof merged commit 0950954 into FunkinCrew:develop Oct 23, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants