Skip to content

import static fields from scripted classes - #29

Merged
Jamextreme140 merged 1 commit into
CodenameCrew:codename-devfrom
hackx2:scripted-class-static-imports
Nov 16, 2026
Merged

Jamextreme140 merged 1 commit into
CodenameCrew:codename-devfrom
hackx2:scripted-class-static-imports

Conversation

@hackx2

@hackx2 hackx2 commented Nov 16, 2026

Copy link
Copy Markdown
class M {
    public static function double(val:Float){
        return val * 2;
    }
} 

import M.double; 
double(10)

Before this pr, this script resulted in: ERR: exception thrown : hscript:1: Invalid class: M.double was not found.
Now, it passes successfully.

Also, compiled-class static imports are routed through importResolve (to prevent importing static fields from blacklisted classes).

@Jamextreme140
Jamextreme140 merged commit 6136402 into CodenameCrew:codename-dev Nov 16, 2026
1 check failed
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