Skip to content

Parameters in virtual #[func(gd_self)] are not validated #1374

@Yarwin

Description

@Yarwin

Following code:

#[derive(GodotClass)]
#[class(init, base = Node)]
struct MyClass {
    base: Base<Node>,
}

#[godot_api]
impl INode for MyClass {
    #[func(gd_self)]
    fn physics_process(_this: Gd<Self>) {

    }

    #[func(gd_self)]
    fn process(_this: Gd<Self>, _delta: i32) {}
}

Compiles without any errors (this is bad). We should figure out some way to validate virtual methods with gd_self as well.

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