{"record":{"id":"c22ce6aec6a7c103","repo":"gleam-lang/gleam","slug":"no-variable-size","errorCode":null,"errorMessage":"no variable size","messagePattern":"no variable size","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"compiler-core/src/javascript/decision.rs","lineNumber":1777,"sourceCode":"            _ => (),\n        }\n\n        // Otherwise we'll take a regular slice out of the bit array, depending\n        // on the type of the segment.\n        let (start, end) =\n            if let (ReadSize::ConstantBits(size), Some(from_bits)) = (size, from_bits) {\n                // If both the start and and are known at compile time we can use\n                // those directly in the slice call and perform no addition at\n                // runtime.\n                let start = from_bits.clone().to_doc(arena);\n                let end = (from_bits + size).to_doc(arena);\n                (start, end)\n            } else {\n                // Otherwise we'll have to sum the variable part and the constant\n                // one to tell how long the slice should be.\n                let size = self\n                    .read_size_to_doc(arena, size)\n                    .expect(\"no variable size\");\n                let start = self.offset_to_doc(arena, from, false);\n                let end = if from.is_zero() {\n                    size\n                } else {\n                    docvec![arena, start, SPACE_PLUS_SPACE_DOCUMENT, size]\n                };\n                (start, end)\n            };\n\n        match type_ {\n            ReadType::Int => {\n                self.bit_array_slice_to_int(arena, bit_array, start, end, endianness, *signed)\n            }\n            ReadType::Float => {\n                self.bit_array_slice_to_float(arena, bit_array, start, end, endianness)\n            }\n            ReadType::BitArray => self.bit_array_slice_with_end(arena, bit_array, from, end),\n            ReadType::String | ReadType::UtfCodepoint => {","sourceCodeStart":1759,"sourceCodeEnd":1795,"githubUrl":"https://github.com/gleam-lang/gleam/blob/7e623aa83da3776faee50ca4ab9a6c40124acd95/compiler-core/src/javascript/decision.rs#L1759-L1795","documentation":"Error \"no variable size\" thrown in gleam-lang/gleam.","triggerScenarios":"Thrown at compiler-core/src/javascript/decision.rs:1777 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"}