mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
add test for tag with no args and boolean
This commit is contained in:
parent
d701bf5f6e
commit
72497a1916
1 changed files with 30 additions and 1 deletions
|
@ -969,7 +969,7 @@ mod test_reporting {
|
||||||
4│ f Blue
|
4│ f Blue
|
||||||
^^^^
|
^^^^
|
||||||
|
|
||||||
This `Blue` global tag application has the type:
|
This `Blue` global tag has the type:
|
||||||
|
|
||||||
[ Blue ]a
|
[ Blue ]a
|
||||||
|
|
||||||
|
@ -2086,6 +2086,35 @@ mod test_reporting {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn boolean_tag() {
|
||||||
|
report_problem_as(
|
||||||
|
indoc!(
|
||||||
|
r#"
|
||||||
|
42 + True
|
||||||
|
"#
|
||||||
|
),
|
||||||
|
indoc!(
|
||||||
|
r#"
|
||||||
|
── TYPE MISMATCH ───────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
The 2nd argument to `add` is not what I expect:
|
||||||
|
|
||||||
|
1│ 42 + True
|
||||||
|
^^^^
|
||||||
|
|
||||||
|
This `True` boolean has the type:
|
||||||
|
|
||||||
|
[ True ]a
|
||||||
|
|
||||||
|
But `add` needs the 2nd argument to be:
|
||||||
|
|
||||||
|
Num a
|
||||||
|
"#
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn tag_missing() {
|
fn tag_missing() {
|
||||||
report_problem_as(
|
report_problem_as(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue