From d70e803dff7ed560f0921bfa6f5572f53dcf16d2 Mon Sep 17 00:00:00 2001 From: Folkert Date: Fri, 24 Dec 2021 21:17:18 +0100 Subject: [PATCH] add test --- compiler/test_gen/src/gen_primitives.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/compiler/test_gen/src/gen_primitives.rs b/compiler/test_gen/src/gen_primitives.rs index d6dc7efeb6..f8443f283e 100644 --- a/compiler/test_gen/src/gen_primitives.rs +++ b/compiler/test_gen/src/gen_primitives.rs @@ -3137,3 +3137,24 @@ fn call_that_needs_closure_parameter() { RocStr ); } + +#[test] +#[cfg(any(feature = "gen-llvm"))] +fn alias_defined_out_of_order() { + assert_evals_to!( + indoc!( + r#" + app "test" provides [ main ] to "./platform" + + main : Foo + main = "foo" + + Foo : Bar + Bar : Str + + "# + ), + RocStr::from_slice(b"foo"), + RocStr + ); +}