Handle errors in generated type annotations

This commit is contained in:
snobee 2025-01-27 13:50:13 -08:00
parent 0ddf12e323
commit 46736ccaea
No known key found for this signature in database
GPG key ID: ABF756C92D69FDF1
5 changed files with 182 additions and 57 deletions

View file

@ -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());