Fixed codegen for function type
This commit is contained in:
@@ -268,14 +268,14 @@ impl GetRust for TypeExpr {
|
|||||||
params,
|
params,
|
||||||
} => {
|
} => {
|
||||||
format!(
|
format!(
|
||||||
"{} -> {}({})",
|
"{}({}) -> {}",
|
||||||
kind.get_rust(),
|
kind.get_rust(),
|
||||||
return_type.get_rust(),
|
|
||||||
params
|
params
|
||||||
.iter()
|
.iter()
|
||||||
.map(TypeExpr::get_rust)
|
.map(TypeExpr::get_rust)
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.join(", ")
|
.join(", "),
|
||||||
|
return_type.get_rust(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,4 @@ void main()
|
|||||||
items::impl_test::run_tests();
|
items::impl_test::run_tests();
|
||||||
items::attribute_test::run_tests();
|
items::attribute_test::run_tests();
|
||||||
println!("\x1b[32m\nAll tests passed!\x1b[0m");
|
println!("\x1b[32m\nAll tests passed!\x1b[0m");
|
||||||
|
|
||||||
void fn() hello = () => {};
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user