mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
add assert
This commit is contained in:
parent
32dcd96f80
commit
e2a3e6792d
1 changed files with 3 additions and 0 deletions
|
@ -73,6 +73,9 @@ pub fn build_has_tag_id<'a, 'ctx, 'env>(
|
|||
) -> FunctionValue<'ctx> {
|
||||
let fn_name: &str = &format!("{}_has_tag_id", function.get_name().to_string_lossy());
|
||||
|
||||
// currently the code assumes we're dealing with a non-recursive layout
|
||||
debug_assert!(matches!(union_layout, UnionLayout::NonRecursive(_)));
|
||||
|
||||
match env.module.get_function(fn_name) {
|
||||
Some(function_value) => function_value,
|
||||
None => build_has_tag_id_help(env, union_layout, &fn_name),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue