Skip to content

Strange Unknown<0> cannot be called error after evaluating static functions #12407

@NotHyper-474

Description

@NotHyper-474

I have a simple macro where you provide classes and it goes over their static functions to create wrapper fields for them.
However I'm running into an odd error that seems completely unrelated.

[ERROR] .../hxflx-sample/.haxelib/haxeui-core/git/haxe/ui/tooltips/ToolTip.hx:7: characters 9-16

  7 |         super();
    |         ^^^^^^^
    | Unknown<0> cannot be called

I messed around with the macro and realized this error would only occur when I ran expr() on a field or Context.follow on that field's type, but strangely this only occurred when the function field executed anything from the class Dialogs that comes with the Haxe UI library, just like the one below. Commenting it out will cause the error to disappear.

public static function sumFunc()
{
    Dialogs.messageBox('');
}

Reproduced on Haxe 4.3.7 and 5.0.0-preview1, I also made a small project where I replicated the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions