Skip to content

Commit

Permalink
Fail hard when encountering native lookups / permutations
Browse files Browse the repository at this point in the history
  • Loading branch information
georgwiese committed Dec 23, 2024
1 parent b3eaea9 commit 7715217
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ use std::{
use itertools::Itertools;
use powdr_ast::{
analyzed::{
AlgebraicExpression, Analyzed, Identity, LookupIdentity, PermutationIdentity,
PhantomLookupIdentity, PhantomPermutationIdentity, Reference, StatementIdentifier, Symbol,
SymbolKind,
AlgebraicExpression, Analyzed, Identity, PhantomLookupIdentity, PhantomPermutationIdentity,
Reference, StatementIdentifier, Symbol, SymbolKind,
},
parsed::{
asm::{AbsoluteSymbolPath, SymbolPath},
Expand Down Expand Up @@ -220,9 +219,7 @@ fn split_by_namespace<F: FieldElement>(
1 => (namespaces.into_iter().next().unwrap() == current_namespace)
.then(|| (current_namespace.clone(), statement)),
_ => match identity {
Identity::Lookup(LookupIdentity { left, right, .. })
| Identity::PhantomLookup(PhantomLookupIdentity { left, right, .. })
| Identity::Permutation(PermutationIdentity { left, right, .. })
Identity::PhantomLookup(PhantomLookupIdentity { left, right, .. })
| Identity::PhantomPermutation(PhantomPermutationIdentity {
left,
right,
Expand All @@ -241,6 +238,9 @@ fn split_by_namespace<F: FieldElement>(
log::debug!("Skipping connecting identity: {identity}");
None
}
Identity::Lookup(_) | Identity::Permutation(_) => {
panic!("Unexpected native connection: {identity}")
}
_ => {
panic!("Identity references multiple namespaces: {identity}");
}
Expand Down

0 comments on commit 7715217

Please sign in to comment.