From d0686582d0c3206daaf23780b5daa6ff4752988e Mon Sep 17 00:00:00 2001 From: Folkert Date: Tue, 8 Dec 2020 20:29:59 +0100 Subject: [PATCH] comment invalid assertion --- compiler/gen/src/llvm/build.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/gen/src/llvm/build.rs b/compiler/gen/src/llvm/build.rs index 163f3b8ad3..47111db78a 100644 --- a/compiler/gen/src/llvm/build.rs +++ b/compiler/gen/src/llvm/build.rs @@ -828,9 +828,10 @@ pub fn build_exp_expr<'a, 'ctx, 'env>( let tag_field_layouts = fields[*tag_id as usize]; for (field_symbol, tag_field_layout) in arguments.iter().zip(tag_field_layouts.iter()) { - let (val, val_layout) = load_symbol_and_layout(env, scope, field_symbol); + let (val, _val_layout) = load_symbol_and_layout(env, scope, field_symbol); - debug_assert_eq!(tag_field_layout, val_layout); + // this check fails for recursive tag unions, but can be helpful while debugging + // debug_assert_eq!(tag_field_layout, val_layout); // Zero-sized fields have no runtime representation. // The layout of the struct expects them to be dropped!