From baa3debae2e214f681ffe25dfb4b95eb16ab37e6 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Sat, 27 Jun 2020 16:49:48 -0400 Subject: [PATCH] Update cyclic alias test --- compiler/reporting/tests/test_reporting.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler/reporting/tests/test_reporting.rs b/compiler/reporting/tests/test_reporting.rs index a59dbcd319..25b3e53da4 100644 --- a/compiler/reporting/tests/test_reporting.rs +++ b/compiler/reporting/tests/test_reporting.rs @@ -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