Skip to content

[ENHANCEMENT] Support resolving class constructors using Class.new - #579

Merged
AbnormalPoof merged 1 commit into
FunkinCrew:developfrom
ahmed7p:class-constructor
Nov 4, 2026
Merged

AbnormalPoof merged 1 commit into
FunkinCrew:developfrom
ahmed7p:class-constructor

Conversation

@ahmed7p

@ahmed7p ahmed7p commented Nov 3, 2026

Copy link
Copy Markdown

Overview

This PR adds support for dynamic class constructor resolution via .new in hscript reflection, while also introducing robust error handling for invalid constructor call patterns.

Changes

  • Interp:
    • Added field resolution handling for "new" when accessed on a standard Class or a PolymodStaticClassReference.
    • Implemented explicit interception to throw descriptive errors if a constructor is improperly called Class.new().
  • Error Handling:
    • AddedEInvalidConstructorCall(clsName) error.

@AbnormalPoof
AbnormalPoof merged commit 05575df into FunkinCrew:develop Nov 4, 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