diff --git a/crates/compiler/types/src/types.rs b/crates/compiler/types/src/types.rs index 6c196ce27a..21b7b3c7ca 100644 --- a/crates/compiler/types/src/types.rs +++ b/crates/compiler/types/src/types.rs @@ -4607,18 +4607,9 @@ pub fn gather_tags_unsorted_iter( let mut stack = vec![other_fields]; - #[cfg(debug_assertions)] - let mut seen_head_union = false; - loop { match subs.get_content_without_compacting(ext.var()) { Structure(TagUnion(sub_fields, sub_ext)) => { - #[cfg(debug_assertions)] - { - assert!(!seen_head_union, "extension variable is another tag union, but I expected it to be either open or closed!"); - seen_head_union = true; - } - stack.push(*sub_fields); ext = *sub_ext;