mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-02 19:32:17 +00:00
Don't assume tag id is in the tag arguments in making decision tree
This commit is contained in:
parent
a9b02aed5e
commit
d6669aed2e
1 changed files with 2 additions and 5 deletions
|
@ -9698,8 +9698,7 @@ fn from_can_pattern_help<'a>(
|
|||
ctors.push(Ctor {
|
||||
tag_id: TagId(i as _),
|
||||
name: CtorName::Tag(tag_name.expect_tag_ref().clone()),
|
||||
// don't include tag discriminant in arity
|
||||
arity: args.len() - 1,
|
||||
arity: args.len(),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -9855,8 +9854,7 @@ fn from_can_pattern_help<'a>(
|
|||
ctors.push(Ctor {
|
||||
tag_id: TagId(!nullable_id as _),
|
||||
name: CtorName::Tag(nullable_name.expect_tag_ref().clone()),
|
||||
// FIXME drop tag
|
||||
arity: other_fields.len() - 1,
|
||||
arity: other_fields.len(),
|
||||
});
|
||||
|
||||
let union = roc_exhaustive::Union {
|
||||
|
@ -9869,7 +9867,6 @@ fn from_can_pattern_help<'a>(
|
|||
let it = if tag_name == nullable_name.expect_tag_ref() {
|
||||
[].iter()
|
||||
} else {
|
||||
// FIXME drop tag
|
||||
argument_layouts.iter()
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue