mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
parent
83f9c2a3a0
commit
9429e50814
1 changed files with 19 additions and 0 deletions
|
@ -9942,4 +9942,23 @@ I need all branches in an `if` to have the same type!
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn issue_2778_specialization_is_not_a_redundant_pattern() {
|
||||||
|
new_report_problem_as(
|
||||||
|
"issue_2778_specialization_is_not_a_redundant_pattern",
|
||||||
|
indoc!(
|
||||||
|
r#"
|
||||||
|
formatColor = \color ->
|
||||||
|
when color is
|
||||||
|
Red -> "red"
|
||||||
|
Yellow -> "yellow"
|
||||||
|
_ -> "unknown"
|
||||||
|
|
||||||
|
Red |> formatColor |> Str.concat (formatColor Orange)
|
||||||
|
"#
|
||||||
|
),
|
||||||
|
"", // no problem
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue