mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
fix weird region in error messages
This commit is contained in:
parent
b45b39af5e
commit
a82cc7f28f
2 changed files with 3 additions and 3 deletions
|
@ -1019,7 +1019,7 @@ fn constrain_def(env: &Env, def: &Def, body_con: Constraint) -> Constraint {
|
||||||
expr_type,
|
expr_type,
|
||||||
annotation_expected.clone(),
|
annotation_expected.clone(),
|
||||||
Category::Storage,
|
Category::Storage,
|
||||||
annotation.region,
|
Region::span_across(&annotation.region, &def.loc_expr.region),
|
||||||
));
|
));
|
||||||
|
|
||||||
// when a def is annotated, and it's body is a closure, treat this
|
// when a def is annotated, and it's body is a closure, treat this
|
||||||
|
|
|
@ -3542,8 +3542,8 @@ mod test_reporting {
|
||||||
|
|
||||||
Something is off with the body of this definition:
|
Something is off with the body of this definition:
|
||||||
|
|
||||||
2 ┆ { x, y } : { x : Int, y ? Bool }
|
2 ┆> { x, y } : { x : Int, y ? Bool }
|
||||||
┆ ^^^^^^^^^^^^^^^^^^^^^
|
3 ┆> { x, y } = rec
|
||||||
|
|
||||||
The body is a value of type:
|
The body is a value of type:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue