Skip to content

Additional error reports + Add POLYMOD_STRICT_SYNTAX compiler define#455

Draft
nykwono wants to merge 1 commit into
FunkinCrew:developfrom
nykwono:strict-syntax-override-functions
Draft

Additional error reports + Add POLYMOD_STRICT_SYNTAX compiler define#455
nykwono wants to merge 1 commit into
FunkinCrew:developfrom
nykwono:strict-syntax-override-functions

Conversation

@nykwono

@nykwono nykwono commented Jul 24, 2026

Copy link
Copy Markdown

This PR adds a couple of new error reports to scripted classes including:

  • Error when trying to set a variable to be private when it's already public, vice versa.
  • Error when there's an overriding function that's also static.

This also adds an additional compiler define "POLYMOD_STRICT_SYNTAX"

This compiler define is as you can guess for if the user wants scripts to have syntax handling to be more similar to Haxe, thus having it be more stricter on when errors are thrown and such.

Right now this define includes error reporting for:

  • Having a function that overrides a super class function but doesn't use the override accessor
  • Having a function with the override accessor that doesn't override anything
  • Having a function with the override accessor with no parent class.
  • Having a variable that's inline but also isn't static.

This is currently a draft so I can get feedback on what to change, for other people to test it, in case there's more error reports that I should add before having it ready for review.

image image

@AbnormalPoof

Copy link
Copy Markdown
Member

This is... so peak........

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