diff --git a/vlib/v/ast/str.v b/vlib/v/ast/str.v index 5ecc7118bb0df3..d83d1cda01d91f 100644 --- a/vlib/v/ast/str.v +++ b/vlib/v/ast/str.v @@ -139,7 +139,6 @@ pub fn (t &Table) stringify_fn_decl(node &FnDecl, cur_mod string, m2a map[string fn (t &Table) stringify_fn_after_name(node &FnDecl, mut f strings.Builder, cur_mod string, m2a map[string]string, needs_wrap bool) { mut add_para_types := true - mut is_wrap_needed := false if node.generic_names.len > 0 { if node.is_method { sym := t.sym(node.params[0].typ) @@ -174,22 +173,6 @@ fn (t &Table) stringify_fn_after_name(node &FnDecl, mut f strings.Builder, cur_m } is_last_param := i == node.params.len - 1 is_type_only := param.name == '' - should_add_type := true // is_last_param || is_type_only || node.params[i + 1].typ != param.typ || - // (node.is_variadic && i == node.params.len - 2) - pre_comments := param.comments.filter(it.pos.pos < param.pos.pos) - if pre_comments.len > 0 { - if i == 0 { - is_wrap_needed = true - f.write_string('\n\t') - } - write_comments(pre_comments, mut f) - if !f.last_n(1)[0].is_space() { - f.write_string(' ') - } - } - if is_wrap_needed { - f.write_string('\t') - } if param.is_mut { f.write_string(param.typ.share().str() + ' ') } @@ -219,15 +202,13 @@ fn (t &Table) stringify_fn_after_name(node &FnDecl, mut f strings.Builder, cur_m } s = util.no_cur_mod(s, cur_mod) s = shorten_full_name_based_on_aliases(s, m2a) - if should_add_type { - if !is_type_only { - f.write_string(' ') - } - if node.is_variadic && is_last_param { - f.write_string('...') - } - f.write_string(s) + if !is_type_only { + f.write_string(' ') + } + if node.is_variadic && is_last_param { + f.write_string('...') } + f.write_string(s) } if !is_last_param { if needs_wrap && f.len - last_len > 100 {