fix: "f..o.o;" crashes the server (#629)

this is a fix for #381 and a hack for #409
(related, get triggered by "f..o.o;")
This commit is contained in:
nullptrdevs
2022-09-07 10:14:11 -07:00
committed by GitHub
parent aa81d83136
commit 6269eef776
5 changed files with 30 additions and 6 deletions

View File

@@ -382,7 +382,7 @@ fn symbolReferencesInternal(arena: *std.heap.ArenaAllocator, store: *DocumentSto
.field_access => {
try symbolReferencesInternal(arena, store, .{ .node = datas[node].lhs, .handle = handle }, decl, encoding, context, handler);
const rhs_str = tree.tokenSlice(datas[node].rhs);
const rhs_str = ast.tokenSlice(tree, datas[node].rhs) catch return;
var bound_type_params = analysis.BoundTypeParams{};
const left_type = try analysis.resolveFieldAccessLhsType(
store,