{"record":{"id":"7e6916c5860f9bb9","repo":"gleam-lang/gleam","slug":"invalid-clause-index","errorCode":null,"errorMessage":"invalid clause index","messagePattern":"invalid clause index","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"compiler-core/src/javascript/decision.rs","lineNumber":352,"sourceCode":"                    subject,\n                } = &self.kind\n                {\n                    CaseBody::Statements(self.assignment_no_match(\n                        arena,\n                        subject.to_doc(arena),\n                        kind,\n                        *subject_location,\n                        *pattern_location,\n                    ))\n                } else {\n                    unreachable!(\"Invalid decision tree reached code generation\")\n                }\n            }\n            Decision::Run { body } => {\n                let location = match self.kind {\n                    DecisionKind::Case { clauses } => clauses\n                        .get(body.clause_index)\n                        .expect(\"invalid clause index\")\n                        .location(),\n                    DecisionKind::LetAssert {\n                        subject_location,\n                        pattern_location,\n                        ..\n                    } => match self.variables.variable_assignment {\n                        // When the variables are being declared, they\n                        // correspond to the pattern.\n                        VariableAssignment::Declare => pattern_location,\n                        // When the variables are being assigned, they\n                        // correspond to the subject.\n                        VariableAssignment::Reassign => subject_location,\n                    },\n                };\n                let source_map_tracker = self\n                    .variables\n                    .expression_generator\n                    .source_map_tracker(arena, location.start);","sourceCodeStart":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/gleam-lang/gleam/blob/7e623aa83da3776faee50ca4ab9a6c40124acd95/compiler-core/src/javascript/decision.rs#L334-L370","documentation":"Error \"invalid clause index\" thrown in gleam-lang/gleam.","triggerScenarios":"Thrown at compiler-core/src/javascript/decision.rs:352 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7e623aa83da3776faee50ca4ab9a6c40124acd95","analyzedAt":"2026-08-17T00:07:02.091Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}