You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expect
patternMatch = \input ->
when input is
[Fo, Bar, Baz] -> Bingo
_ -> Other
first = (patternMatch [Fo, Bar, Baz] == Bingo)
#second = (patternMatch [Fo, Bar, Baz, D] != Bingo)
first
This passes with roc test, but this doesn't:
expect
patternMatch = \input ->
when input is
[Fo, Bar, Baz] -> Bingo
_ -> Other
first = (patternMatch [Fo, Bar, Baz] == Bingo)
second = (patternMatch [Fo, Bar, Baz, D] != Bingo)
first
Output:
── EXPECT FAILED ─ ...os/examples/examples/PatternMatching/PatternMatching.roc ─
This expectation failed:
24│> expect
25│> patternMatch = \input ->
26│> when input is
27│> [Fo, Bar, Baz] -> Bingo
28│> _ -> Other
29│>
30│> first = (patternMatch [Fo, Bar, Baz] == Bingo)
31│> second = (patternMatch [Fo, Bar, Baz, D] != Bingo)
32│>
33│> first
When it failed, these variables had these values:
first : Bool
first = Bool.false
second : Bool
second = Bool.true
1 failed and 0 passed in 230 ms.
Note that second is not used so it is not supposed to change anything 😄 .
This passes with
roc test
, but this doesn't:Output:
Note that
second
is not used so it is not supposed to change anything 😄 .@ayazhafiz this error was introduced with PR #5317, or commit 12b2f7e
The text was updated successfully, but these errors were encountered: