-
-
Notifications
You must be signed in to change notification settings - Fork 237
Open
Labels
c: coreCore componentsCore componentsc: ffiLow-level components and interaction with GDExtension APILow-level components and interaction with GDExtension APIfeatureAdds functionality to the libraryAdds functionality to the library
Description
On gdext 0.2.4 this code properly throws errors:
let instance: Gd<Node> = whatever;
// error because function is not defined
instance.call("_not_real", &[]);
// error because function def has a parameter
instance.call("_param_required", &[]);
But when using the Callable, all failures are silent:
let instance: Gd<Node> = whatever;
// nothing happens
instance.callable("_not_real").call(&[]);
// nothing happens
instance.callable("_param_required", &[]);
I would expect callable.call()
here to throw the same errors that instance.call
and gdscript's Callable().call()
do. It would also be awesome to have a result on callable, though this deviates from gdscript's behavior:
let Some(callable) = instance.callable("_not_real") else {
println!("method not found!");
return;
};
Metadata
Metadata
Assignees
Labels
c: coreCore componentsCore componentsc: ffiLow-level components and interaction with GDExtension APILow-level components and interaction with GDExtension APIfeatureAdds functionality to the libraryAdds functionality to the library