Type-safer API for dealing with parameter lists with optional self

This commit is contained in:
Aleksey Kladov 2020-12-01 13:53:12 +03:00
parent 455a0cfda2
commit 6f51f728a1
4 changed files with 21 additions and 10 deletions

View file

@ -139,7 +139,7 @@ fn add_function_impl(
) {
let fn_name = func.name(ctx.db).to_string();
let label = if func.params(ctx.db).is_empty() {
let label = if func.assoc_fn_params(ctx.db).is_empty() {
format!("fn {}()", fn_name)
} else {
format!("fn {}(..)", fn_name)