Skip to content

Commit

Permalink
Fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
FnControlOption authored and leecannon committed Jul 7, 2023
1 parent 2714d01 commit 8545e5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/analysis.zig
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ pub fn isInstanceCall(
func: Ast.full.FnProto,
) !bool {
return call_handle.tree.tokens.items(.tag)[call.ast.lparen - 2] == .period and
call.ast.params.len + 1 == func.ast.params.len and
try analyser.hasSelfParam(func_handle, func);
}

Expand Down
3 changes: 2 additions & 1 deletion src/features/inlay_hints.zig
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ fn writeCallHint(builder: *Builder, call: Ast.full.Call, decl_handle: Analyser.D
try params.append(builder.arena, param);
}

const has_self_param = try builder.analyser.isInstanceCall(handle, call, decl_handle.handle, fn_proto);
const has_self_param = call.ast.params.len + 1 == params.items.len and
try builder.analyser.isInstanceCall(handle, call, decl_handle.handle, fn_proto);

const parameters = params.items[@intFromBool(has_self_param)..];
const arguments = call.ast.params;
Expand Down

0 comments on commit 8545e5f

Please sign in to comment.