Skip to content

Commit

Permalink
fix(ts/analyzer): Prevent extra error from being reported from `repor…
Browse files Browse the repository at this point in the history
…t_error_for_conflicting_parents` (#410)
  • Loading branch information
togami2864 authored Dec 17, 2022
1 parent 22bb3c3 commit acd622f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,9 @@ impl Analyzer<'_, '_> {
) {
match &*err {
ErrorKind::MissingFields { .. } => {}

ErrorKind::Errors { errors, .. }
if errors.iter().all(|err| matches!(&**err, ErrorKind::MissingFields { .. })) => {}

ErrorKind::ObjectAssignFailed { .. } => {}
_ => self.storage.report(err.convert(|err| ErrorKind::InterfaceNotCompatible { span })),
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Stats {
required_error: 4,
matched_error: 2,
extra_error: 6,
required_error: 5,
matched_error: 1,
extra_error: 0,
panic: 0,
}
6 changes: 3 additions & 3 deletions crates/stc_ts_type_checker/tests/tsc-stats.rust-debug
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Stats {
required_error: 4269,
matched_error: 5615,
extra_error: 767,
required_error: 4270,
matched_error: 5614,
extra_error: 761,
panic: 74,
}

0 comments on commit acd622f

Please sign in to comment.