Removed unreachable, switch cases can trigger this

This commit is contained in:
Alexandros Naskos 2020-06-03 19:59:26 +03:00
parent 34fbef97fe
commit b0bb8888d3

View File

@ -982,8 +982,8 @@ pub fn declsFromIndexInternal(
}, },
// TODO: These convey no type information... // TODO: These convey no type information...
.Payload => try decls.append(node.cast(ast.Node.Payload).?.error_symbol), .Payload => try decls.append(node.cast(ast.Node.Payload).?.error_symbol),
// Those are handled in the If, While, For cases. .PointerPayload => try decls.append(node.cast(ast.Node.PointerPayload).?.value_symbol),
.PointerPayload => unreachable, // This should be completely handled for the .For code.
.PointerIndexPayload => unreachable, .PointerIndexPayload => unreachable,
.VarDecl => { .VarDecl => {
try decls.append(node); try decls.append(node);