{"record":{"id":"c440273843a62d78","repo":"gleam-lang/gleam","slug":"record-without-inferred-constructor-made-it-to-cod","errorCode":null,"errorMessage":"record without inferred constructor made it to code generation","messagePattern":"record without inferred constructor made it to code generation","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"compiler-core/src/javascript/expression.rs","lineNumber":2772,"sourceCode":"\n            Constant::Record { type_, name, .. } if type_.is_bool() && name == \"True\" => {\n                TRUE_LOWERCASE_DOCUMENT\n            }\n            Constant::Record { type_, name, .. } if type_.is_bool() && name == \"False\" => {\n                FALSE_LOWERCASE_DOCUMENT\n            }\n            Constant::Record { type_, .. } if type_.is_nil() => UNDEFINED_DOCUMENT,\n\n            Constant::Record {\n                arguments,\n                module,\n                name,\n                type_,\n                ..\n            } => {\n                let tag = expression\n                    .constant_record_tag()\n                    .expect(\"record without inferred constructor made it to code generation\");\n\n                if module.is_none() && type_.is_result() {\n                    if tag == \"Ok\" {\n                        self.tracker.ok_used = true;\n                    } else {\n                        self.tracker.error_used = true;\n                    }\n                }\n\n                // If there's no arguments, then this is either a constructor\n                // which takes arguments being referenced rather than called,\n                // or a variant with no fields at all.\n                if arguments.is_none() {\n                    // If the constructor is not a function that takes arguments,\n                    // it effectively has zero arity.\n                    let arity = type_.fn_arity().unwrap_or(0) as u16;\n                    return self.record_constructor(\n                        arena,","sourceCodeStart":2754,"sourceCodeEnd":2790,"githubUrl":"https://github.com/gleam-lang/gleam/blob/7e623aa83da3776faee50ca4ab9a6c40124acd95/compiler-core/src/javascript/expression.rs#L2754-L2790","documentation":"Error \"record without inferred constructor made it to code generation\" thrown in gleam-lang/gleam.","triggerScenarios":"Thrown at compiler-core/src/javascript/expression.rs:2772 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"}