Allocate ast ids for parameters

This commit is contained in:
Lukas Wirth 2023-09-28 13:16:11 +02:00
parent 3b1b58c225
commit 2b9dde14ab
5 changed files with 34 additions and 20 deletions

View file

@ -261,15 +261,15 @@ impl Printer<'_> {
self.indented(|this| {
for param in params.clone() {
this.print_attrs_of(param, "\n");
match &this.tree[param] {
Param::Normal(ty) => {
match &this.tree[param].type_ref {
Some(ty) => {
if flags.contains(FnFlags::HAS_SELF_PARAM) {
w!(this, "self: ");
}
this.print_type_ref(ty);
wln!(this, ",");
}
Param::Varargs => {
None => {
wln!(this, "...");
}
};