mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
show preceding comment in test panic messages
This commit is contained in:
parent
5a93da5a11
commit
2caf58dfd2
2 changed files with 20 additions and 5 deletions
|
@ -5014,11 +5014,11 @@ fn build_pending_specializations<'a>(
|
|||
is_self_recursive: false,
|
||||
};
|
||||
|
||||
// TODO use the region of the preceding comment (stored as the Symbol's regino)
|
||||
// let name_region = declarations.symbols[index].region;
|
||||
// let expr_region = declarations.expressions[index].region;
|
||||
// let region = Region::span_across(&name_region, &expr_region);
|
||||
let region = declarations.expressions[index].region;
|
||||
// extend the region of the expect expression with the region of the preceding
|
||||
// comment, so it is shown in failure/panic messages
|
||||
let name_region = declarations.symbols[index].region;
|
||||
let expr_region = declarations.expressions[index].region;
|
||||
let region = Region::span_across(&name_region, &expr_region);
|
||||
|
||||
toplevel_expects.insert(symbol, region);
|
||||
procs_base.partial_procs.insert(symbol, proc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue