Skip to content

Commit e7bb4ad

Browse files
committed
Constraint ITrait Bound
1 parent 6c92a05 commit e7bb4ad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

godot-codegen/src/generator/virtual_traits.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pub fn make_virtual_methods_trait(
2323
view: &ApiView,
2424
) -> TokenStream {
2525
let trait_name = ident(trait_name_str);
26+
let class_name = &class.name().rust_ty;
2627

2728
let virtual_method_fns = make_all_virtual_methods(class, all_base_names, view);
2829
let special_virtual_methods = make_special_virtual_methods(notification_enum_name);
@@ -34,7 +35,7 @@ pub fn make_virtual_methods_trait(
3435
#[allow(unused_variables)]
3536
#[allow(clippy::unimplemented)]
3637
#cfg_attributes
37-
pub trait #trait_name: crate::obj::GodotClass + crate::private::You_forgot_the_attribute__godot_api {
38+
pub trait #trait_name: crate::obj::GodotClass<Base = #class_name> + crate::private::You_forgot_the_attribute__godot_api {
3839
#special_virtual_methods
3940
#( #virtual_method_fns )*
4041
}

0 commit comments

Comments
 (0)