Skip nullable ID in nullable wrapped tags when iterating

This commit is contained in:
Ayaz Hafiz 2023-01-09 11:54:51 -06:00
parent ab7de647e4
commit b2688dd3b1
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 59 additions and 7 deletions

View file

@ -2339,3 +2339,27 @@ fn nullable_wrapped_with_non_nullable_singleton_tags() {
"###
)
}
#[mono_test]
fn nullable_wrapped_with_nullable_not_last_index() {
indoc!(
r###"
app "test" provides [main] to "./platform"
Parser : [
OneOrMore Parser,
Keyword Str,
CharLiteral,
]
toIdParser : Parser -> Str
toIdParser = \parser ->
when parser is
OneOrMore _ -> "a"
Keyword _ -> "b"
CharLiteral -> "c"
main = toIdParser CharLiteral == "c"
"###
)
}