Skip to content

Variant Parameter and Return Type Shows Up as (no base) #159

Closed
@Dheatly23

Description

@Dheatly23

I have method with complex multiple dispatch of arguments and maybe empty return value. Since Option<T> is not supported as parameters nor return value, i use Variant as workaround.

Example:

#[func]
fn method(&self, arg0: Variant) -> Variant {
    // ...
}

But when i call it in GDScript, it errors with:

Line [XXX]: Cannot get return value of call to "method()" because it returns "void".

When i checked into it's documentation i saw this in methods section:

(no base) method(arg0: (no base))

Is this normal? I can't call it since it returns "void" even though it's not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugc: registerRegister classes, functions and other symbols to GDScript

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions