mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Handle errors in generated type annotations
This commit is contained in:
parent
0ddf12e323
commit
46736ccaea
5 changed files with 182 additions and 57 deletions
|
@ -357,6 +357,7 @@ impl AnalyzedDocument {
|
|||
*module_id,
|
||||
interns,
|
||||
)
|
||||
.ok()?
|
||||
.into_iter()
|
||||
.map(|(offset, new_text)| {
|
||||
let pos = roc_region::all::Position::new(offset as u32);
|
||||
|
@ -392,7 +393,8 @@ impl AnalyzedDocument {
|
|||
*module_id,
|
||||
decl.var,
|
||||
decl.range,
|
||||
);
|
||||
)
|
||||
.ok()?;
|
||||
|
||||
let pos = RocPosition::new(offset as u32);
|
||||
let range = Region::new(pos, pos).to_range(self.line_info());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue