Do not qualify builtin modules with package shorthand when loading

This commit is contained in:
Ayaz Hafiz 2022-09-21 09:46:40 -05:00
parent b081acaf3c
commit 7e5ff4883f
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 58 additions and 8 deletions

View file

@ -872,3 +872,40 @@ fn issue_2863_module_type_does_not_exist() {
Ok(_) => unreachable!("we expect failure here"),
}
}
#[test]
fn import_builtin_in_platform_and_check_app() {
let modules = vec![
(
"platform/main.roc",
indoc!(
r#"
platform "testplatform"
requires {} { main : Str }
exposes []
packages {}
imports [Str]
provides [mainForHost]
mainForHost : Str
mainForHost = main
"#
),
),
(
"Main",
indoc!(
r#"
app "test"
packages { pf: "platform/main.roc" }
provides [main] to pf
main = ""
"#
),
),
];
let result = multiple_modules("issue_2863_module_type_does_not_exist", modules);
assert!(result.is_ok(), "should check");
}