diff --git a/src/server/inspections/compiler/utils.v b/src/server/inspections/compiler/utils.v index c4342f7c..e8cb1eba 100644 --- a/src/server/inspections/compiler/utils.v +++ b/src/server/inspections/compiler/utils.v @@ -97,7 +97,7 @@ fn exec_compiler_diagnostics(compiler_path string, uri lsp.DocumentUri) ?[]inspe ...report filepath: os.join_path_single(dir_path, report.filepath) } - } else if start_idx := dir_path.index_last(file_dir_path) { + } else if start_idx := dir_path.last_index(file_dir_path) { // reported file appears to be in a subdirectory of dir_path report = inspections.Report{ ...report diff --git a/src/tests/testdata/benchmarks/checker.v b/src/tests/testdata/benchmarks/checker.v index 3135705b..18cecd6e 100644 --- a/src/tests/testdata/benchmarks/checker.v +++ b/src/tests/testdata/benchmarks/checker.v @@ -484,7 +484,7 @@ fn (mut c Checker) check_valid_snake_case(name string, identifier string, pos to } fn stripped_name(name string) string { - idx := name.index_last('.') or { -1 } + idx := name.last_index('.') or { -1 } return name[(idx + 1)..] }