Constructor generics

This commit is contained in:
2026-05-08 17:14:39 +02:00
parent bbcc639331
commit 65f4c5278d
4 changed files with 11 additions and 3 deletions
+4 -2
View File
@@ -394,8 +394,9 @@ impl ToRust for TopLevelKind {
.join(", ");
cg.add_indentedln(&format!(
"{}fn new({}) -> Self {{",
"{}fn new{}({}) -> Self {{",
constructor.visibility.get_rust(),
constructor.generics.get_rust(),
params_str
));
cg.indent += 1;
@@ -430,8 +431,9 @@ impl ToRust for TopLevelKind {
// Constructor function
cg.add_indentedln(&format!(
"{}fn construct_class(&mut self, {}) {{",
"{}fn construct_class{}(&mut self, {}) {{",
constructor.visibility.get_rust(),
constructor.generics.get_rust(),
params_str
));
cg.indent += 1;