Reproduce alias import bug

This commit is contained in:
Richard Feldman 2020-02-19 21:15:28 -08:00
parent 8e37b650cd
commit 54a5349306
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,7 @@
interface ImportAlias
exposes [ unit ]
imports [ Dep1 ]
unit : Dep1.Unit
unit = Unit

View File

@ -153,6 +153,22 @@ mod test_load {
});
}
#[test]
fn import_alias() {
test_async(async {
let subs_by_module = MutMap::default();
let loaded_module =
load_fixture("interface_with_deps", "ImportAlias", subs_by_module).await;
expect_types(
loaded_module,
hashmap! {
"unit" => "Dep1.Unit",
},
);
});
}
#[test]
fn load_and_typecheck() {
test_async(async {