HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.14k stars 656 forks source link

Just confused #11596

Closed Joalor64GH closed 7 months ago

Joalor64GH commented 7 months ago

I'm just testing someone's event system, but this code caused an error. Why doesn't it work?

public function new() {
    if (!Std.isOfType(T, Function)) {
        throw new Exception("type of customevents.Event must be function");
    }
    // etc...
}
Simn commented 7 months ago

Please refer to https://community.haxe.org for questions like this.