mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Skip nullable ID in nullable wrapped tags when iterating
This commit is contained in:
parent
ab7de647e4
commit
b2688dd3b1
3 changed files with 59 additions and 7 deletions
|
@ -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"
|
||||
"###
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue