diff --git a/crates/compiler/mono/src/layout.rs b/crates/compiler/mono/src/layout.rs index 4039e33425..07b17b1fe7 100644 --- a/crates/compiler/mono/src/layout.rs +++ b/crates/compiler/mono/src/layout.rs @@ -840,13 +840,17 @@ impl<'a> LambdaSet<'a> { } pub fn is_represented(&self) -> Option> { - match self.representation { - Layout::Struct { - field_layouts: &[], .. + if self.has_unwrapped_capture_repr() { + Some(*self.representation) + } else if self.has_multi_dispatch_repr() { + None + } else { + match self.representation { + Layout::Struct { + field_layouts: &[], .. + } => None, + repr => Some(*repr), } - | Layout::Builtin(Builtin::Bool) - | Layout::Builtin(Builtin::Int(..)) => None, - repr => Some(*repr), } }