forked from libre-chip/fayalite
deduce_resets: show more debugging info on assertion failure
This commit is contained in:
parent
3abba7f9eb
commit
965fe53077
|
@ -770,7 +770,10 @@ impl<'a, P: Pass> PassArgs<'a, P> {
|
||||||
fallback_error_source_location: Option<SourceLocation>,
|
fallback_error_source_location: Option<SourceLocation>,
|
||||||
) -> Result<(), DeduceResetsError> {
|
) -> Result<(), DeduceResetsError> {
|
||||||
assert_eq!(a.layout, b.layout);
|
assert_eq!(a.layout, b.layout);
|
||||||
assert_eq!(a.ty, b.ty);
|
assert!(
|
||||||
|
a.ty.can_connect(b.ty),
|
||||||
|
"can't connect types! a:\n{a:?}\nb:\n{b:?}"
|
||||||
|
);
|
||||||
for (a_node_index, b_node_index) in a.node_indexes.into_iter().zip(b.node_indexes) {
|
for (a_node_index, b_node_index) in a.node_indexes.into_iter().zip(b.node_indexes) {
|
||||||
self.state.reset_graph.union(
|
self.state.reset_graph.union(
|
||||||
a_node_index,
|
a_node_index,
|
||||||
|
|
Loading…
Reference in a new issue