mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-10 10:02:38 +03:00
fix weird region in error messages
This commit is contained in:
parent
b45b39af5e
commit
a82cc7f28f
@ -1019,7 +1019,7 @@ fn constrain_def(env: &Env, def: &Def, body_con: Constraint) -> Constraint {
|
||||
expr_type,
|
||||
annotation_expected.clone(),
|
||||
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
|
||||
|
@ -3542,8 +3542,8 @@ mod test_reporting {
|
||||
|
||||
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:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user