mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 16:30:04 +03:00
Don't include DelayedAlias in illegal cycle checks
This commit is contained in:
parent
25ba744cdd
commit
c211ec9790
@ -7324,4 +7324,21 @@ mod solve_expr {
|
||||
"OList",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rosetree_with_result_is_legal_recursive_type() {
|
||||
infer_eq_without_problem(
|
||||
indoc!(
|
||||
r#"
|
||||
Rose a : [Rose (Result (List (Rose a)) I64)]
|
||||
|
||||
x : Rose I64
|
||||
x = Rose (Ok [])
|
||||
|
||||
x
|
||||
"#
|
||||
),
|
||||
"Rose I64",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1482,6 +1482,8 @@ impl Type {
|
||||
Type::Apply(Symbol::LIST_LIST | Symbol::SET_SET, _, _) => false,
|
||||
Type::Apply(..) => internal_error!("cannot chase an Apply!"),
|
||||
Type::Alias { .. } => internal_error!("should be dealiased"),
|
||||
// Must be conservative here because we don't know what the alias expands to yet
|
||||
Type::DelayedAlias(..) => false,
|
||||
// Non-composite types are trivially narrow
|
||||
_ => true,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user