Fix type error in niche unpacking

This commit is contained in:
Ayaz Hafiz 2022-12-28 12:36:42 -06:00
parent ec7ee375d3
commit 1ae3c3b0f8
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -1711,7 +1711,7 @@ impl<'a> LambdaSet<'a> {
lambda_name: LambdaName<'a>,
argument_layouts: &'a [Layout<'a>],
) -> &'a [Layout<'a>] {
let Niche::Captures(CapturesNiche(captures)) = lambda_name.niche;
let Niche(NichePriv::Captures(captures)) = lambda_name.niche;
// TODO(https://github.com/roc-lang/roc/issues/4831): we should turn on this debug-assert;
// however, currently it causes false-positives, because host-exposed functions that are
// function pointers to platform-exposed functions are compiled as if they are proper