mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Delay add "is open" constraint until we know a type variable
This commit is contained in:
parent
7b2b41869f
commit
504c3f9b49
4 changed files with 54 additions and 8 deletions
|
@ -1183,6 +1183,8 @@ fn solve(
|
|||
let actual =
|
||||
either_type_index_to_var(constraints, subs, rank, pools, aliases, *type_index);
|
||||
|
||||
// let content = subs.get_content_without_compacting(actual);
|
||||
// let fmt = roc_types::subs::SubsFmtContent(&content, subs);
|
||||
let mut stack = vec![actual];
|
||||
while let Some(var) = stack.pop() {
|
||||
let mut desc = subs.get(var);
|
||||
|
@ -1190,7 +1192,7 @@ fn solve(
|
|||
Content::Structure(FlatType::TagUnion(tags, ext))
|
||||
if matches!(
|
||||
subs.get_content_without_compacting(ext),
|
||||
Content::Structure(FlatType::EmptyTagUnion)
|
||||
_ // Content::Structure(FlatType::EmptyTagUnion)
|
||||
) =>
|
||||
{
|
||||
let new_ext = subs.fresh_unnamed_flex_var();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue