Unwrap layouts containing void layouts as newtypes

Addresses the attempt to do so in https://github.com/roc-lang/roc/pull/3465

Co-authored-by: Folkert <folkert@folkertdev.nl>
This commit is contained in:
Ayaz Hafiz 2022-09-19 16:47:27 -05:00
parent 639c1e5fa3
commit f41936d5e5
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
9 changed files with 228 additions and 14 deletions

View file

@ -1949,3 +1949,16 @@ fn match_on_result_with_uninhabited_error_branch() {
"#
)
}
#[mono_test]
fn unreachable_void_constructor() {
indoc!(
r#"
app "test" provides [main] to "./platform"
x : []
main = if True then Ok x else Err "abc"
"#
)
}