From 2c0e6eeec15b80c6579f83cbdd152e644b974fbb Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Wed, 19 Feb 2020 21:36:54 -0800 Subject: [PATCH] Reproduce Unit alias bug --- tests/fixtures/build/no_deps/Unit.roc | 8 ++++++++ tests/test_load.rs | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/fixtures/build/no_deps/Unit.roc diff --git a/tests/fixtures/build/no_deps/Unit.roc b/tests/fixtures/build/no_deps/Unit.roc new file mode 100644 index 0000000000..bcfa0e6dcc --- /dev/null +++ b/tests/fixtures/build/no_deps/Unit.roc @@ -0,0 +1,8 @@ +interface Unit + exposes [ unit ] + imports [] + +Unit : [ Unit ] + +unit : Unit +unit = Unit diff --git a/tests/test_load.rs b/tests/test_load.rs index e4baf30263..78f88c7565 100644 --- a/tests/test_load.rs +++ b/tests/test_load.rs @@ -153,6 +153,22 @@ mod test_load { }); } + #[test] + fn load_unit() { + test_async(async { + let subs_by_module = MutMap::default(); + let loaded_module = + load_fixture("no_deps", "Unit", subs_by_module).await; + + expect_types( + loaded_module, + hashmap! { + "unit" => "Unit.Unit", + }, + ); + }); + } + #[test] fn import_alias() { test_async(async {