Reproduce Unit alias bug

This commit is contained in:
Richard Feldman 2020-02-19 21:36:54 -08:00
parent 8fdc77167a
commit 2c0e6eeec1
2 changed files with 24 additions and 0 deletions

8
tests/fixtures/build/no_deps/Unit.roc vendored Normal file
View File

@ -0,0 +1,8 @@
interface Unit
exposes [ unit ]
imports []
Unit : [ Unit ]
unit : Unit
unit = Unit

View File

@ -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 {