gleam-lang/gleam · error
record without inferred constructor made it to code generati
Error message
record without inferred constructor made it to code generation
What it means
Error "record without inferred constructor made it to code generation" thrown in gleam-lang/gleam.
Source
Thrown at compiler-core/src/javascript/expression.rs:2772
Constant::Record { type_, name, .. } if type_.is_bool() && name == "True" => {
TRUE_LOWERCASE_DOCUMENT
}
Constant::Record { type_, name, .. } if type_.is_bool() && name == "False" => {
FALSE_LOWERCASE_DOCUMENT
}
Constant::Record { type_, .. } if type_.is_nil() => UNDEFINED_DOCUMENT,
Constant::Record {
arguments,
module,
name,
type_,
..
} => {
let tag = expression
.constant_record_tag()
.expect("record without inferred constructor made it to code generation");
if module.is_none() && type_.is_result() {
if tag == "Ok" {
self.tracker.ok_used = true;
} else {
self.tracker.error_used = true;
}
}
// If there's no arguments, then this is either a constructor
// which takes arguments being referenced rather than called,
// or a variant with no fields at all.
if arguments.is_none() {
// If the constructor is not a function that takes arguments,
// it effectively has zero arity.
let arity = type_.fn_arity().unwrap_or(0) as u16;
return self.record_constructor(
arena,View on GitHub (pinned to 7e623aa83d)
When it happens
Trigger: Thrown at compiler-core/src/javascript/expression.rs:2772 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gleam-lang/gleam@7e623aa83d (2026-08-17).
Data as JSON: /api/errors/c440273843a62d78.
Report an issue: GitHub.