mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Lambda sets don't need extension vars
This commit is contained in:
parent
c2a2ce690c
commit
790eb8e20c
18 changed files with 165 additions and 165 deletions
|
@ -1875,18 +1875,25 @@ fn type_to_variable<'a>(
|
|||
register_with_known_var(subs, destination, rank, pools, content)
|
||||
}
|
||||
|
||||
ClosureTag {
|
||||
name,
|
||||
captures,
|
||||
ext,
|
||||
} => {
|
||||
ClosureTag { name, captures } => {
|
||||
let tag_name = TagName::Closure(*name);
|
||||
let args = &*arena.alloc([(tag_name, captures.as_slice())]);
|
||||
let ext = &*arena.alloc(TypeExtension::Open(Box::new(Type::Variable(*ext))));
|
||||
let (union_tags, ext) =
|
||||
type_to_union_tags(subs, rank, pools, arena, args, ext, &mut stack);
|
||||
let (solved, ext) = type_to_union_tags(
|
||||
subs,
|
||||
rank,
|
||||
pools,
|
||||
arena,
|
||||
args,
|
||||
&TypeExtension::Closed,
|
||||
&mut stack,
|
||||
);
|
||||
|
||||
let content = Content::Structure(FlatType::TagUnion(union_tags, ext));
|
||||
debug_assert!(matches!(
|
||||
subs.get_content_without_compacting(ext),
|
||||
Content::Structure(FlatType::EmptyTagUnion),
|
||||
));
|
||||
|
||||
let content = Content::LambdaSet(subs::LambdaSet { solved });
|
||||
|
||||
register_with_known_var(subs, destination, rank, pools, content)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue