Fixed type/generics parsing

This commit is contained in:
2026-06-04 18:50:33 +02:00
parent 6cacfd7135
commit 202f41c0e6
6 changed files with 28 additions and 40 deletions
+5 -3
View File
@@ -235,7 +235,7 @@ impl GenRust for (&Vec<Spanned<FieldDeclStmt>>, &Spanned<ClassConstructor>) {
let mut constructor_params = vec![VarDecl {
name: Pattern::Path(false, Path(vec![Identifier(String::from("self"))])),
type_: Some(TypeExpr(
TypeExprKind::Path(Path(vec![Identifier(String::from("Self"))])),
TypeExprKind::Path(Path(vec![Identifier(String::from("Self"))]), None),
vec![TypePostfix::RefMut],
)),
}];
@@ -423,8 +423,10 @@ impl GenRust for TopLevelKind {
let mut impl_ = impl_.clone();
impl_.item.trait_ = Some(impl_.item.target);
impl_.item.target =
TypeExpr(TypeExprKind::Path(Path(vec![name.clone()])), Vec::new());
impl_.item.target = TypeExpr(
TypeExprKind::Path(Path(vec![name.clone()]), None),
Vec::new(),
);
impl_.gen_rust(ctx, cg);
}