mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Do not qualify builtin modules with package shorthand when loading
This commit is contained in:
parent
b081acaf3c
commit
7e5ff4883f
3 changed files with 58 additions and 8 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue