mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
Update cyclic alias test
This commit is contained in:
parent
5176c7efd4
commit
baa3debae2
1 changed files with 7 additions and 7 deletions
|
@ -2409,11 +2409,11 @@ mod test_reporting {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn circular_alias() {
|
||||
fn cyclic_alias() {
|
||||
report_problem_as(
|
||||
indoc!(
|
||||
r#"
|
||||
Foo : { x: Bar }
|
||||
Foo : { x : Bar }
|
||||
Bar : { y : Foo }
|
||||
|
||||
f : Foo
|
||||
|
@ -2426,18 +2426,18 @@ mod test_reporting {
|
|||
r#"
|
||||
-- CYCLIC ALIAS ----------------------------------------------------------------
|
||||
|
||||
The `Bar` alias is recursive in an invalid way:
|
||||
The `Foo` alias is recursive in an invalid way:
|
||||
|
||||
2 ┆ Bar : { y : Foo }
|
||||
1 ┆ Foo : { x : Bar }
|
||||
┆ ^^^^^^^^^^^
|
||||
|
||||
The `Bar` alias depends on itself through the following chain of
|
||||
The `Foo` alias depends on itself through the following chain of
|
||||
definitions:
|
||||
|
||||
┌─────┐
|
||||
│ Bar
|
||||
│ ↓
|
||||
│ Foo
|
||||
│ ↓
|
||||
│ Bar
|
||||
└─────┘
|
||||
|
||||
Recursion in aliases is only allowed if recursion happens behind a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue