Add unnecessary import test cases

This commit is contained in:
Ayaz Hafiz 2022-09-21 13:37:36 -05:00
parent 5f117be306
commit 5dc51ce444
No known key found for this signature in database
GPG Key ID: 0E2A37416A25EF58

View File

@ -10717,4 +10717,32 @@ All branches in an `if` must have the same type!
opaque type to have a different name!
"###
);
test_report!(
unnecessary_builtin_module_import,
indoc!(
r#"
app "test" imports [Str] provides [main] to "./platform"
main = Str.concat "" ""
"#
),
@r###"
"###
);
test_report!(
unnecessary_builtin_type_import,
indoc!(
r#"
app "test" imports [Decode.{ DecodeError }] provides [main, E] to "./platform"
E : DecodeError
main = ""
"#
),
@r###"
"###
);
}