From b0bb8888d3761fc6341a5885c4c6069f2246ab1d Mon Sep 17 00:00:00 2001 From: Alexandros Naskos Date: Wed, 3 Jun 2020 19:59:26 +0300 Subject: [PATCH] Removed unreachable, switch cases can trigger this --- src/analysis.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/analysis.zig b/src/analysis.zig index ff901b1..7bad32a 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -982,8 +982,8 @@ pub fn declsFromIndexInternal( }, // TODO: These convey no type information... .Payload => try decls.append(node.cast(ast.Node.Payload).?.error_symbol), - // Those are handled in the If, While, For cases. - .PointerPayload => unreachable, + .PointerPayload => try decls.append(node.cast(ast.Node.PointerPayload).?.value_symbol), + // This should be completely handled for the .For code. .PointerIndexPayload => unreachable, .VarDecl => { try decls.append(node);