From 50c8cebe26ad3a80ab5f4ffc97522bd382b32770 Mon Sep 17 00:00:00 2001 From: Alexandros Naskos Date: Sun, 31 May 2020 18:02:33 +0300 Subject: [PATCH] Removed reachable unreachable --- src/main.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index fdb80a1..f6ee9e2 100644 --- a/src/main.zig +++ b/src/main.zig @@ -335,7 +335,8 @@ fn identifierFromPosition(pos_index: usize, handle: DocumentStore.Handle) []cons fn gotoDefinitionSymbol(id: i64, analysis_ctx: *DocumentStore.AnalysisContext, decl: *std.zig.ast.Node) !void { const result = try resolveVarDeclFnAlias(analysis_ctx, decl); - const name_token = analysis.getDeclNameToken(result.analysis_ctx.tree(), result.decl) orelse unreachable; + const name_token = analysis.getDeclNameToken(result.analysis_ctx.tree(), result.decl) orelse + return try respondGeneric(id, null_result_response); try send(types.Response{ .id = .{ .Integer = id },