Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion polymod/hscript/_internal/PolymodScriptClass.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,9 @@ class PolymodScriptClass
#if POLYMOD_STRICT_SYNTAX
if (f.access.contains(AOverride) && !superHasField(f.name))
{
// Native class constructors can not be retrieved at runtime so `superHasField` does not account for them so we ignore them.
if (f.name == 'new' && !Std.isOfType(superClass, PolymodScriptClass)) return;

// Throw an error if a function is declared overwritten but isn't overriding anything.
throw 'Field ' + '"${f.name}"' + 'is declared "override"' + "but doesn't override any field.";
}
Expand Down Expand Up @@ -1226,7 +1229,7 @@ class PolymodScriptClass

return false;
}

/**
* Checks if the class has a script function with the given name,
* which has been purged due to an uncaught exception when it was previously called.
Expand Down
Loading