In crates/ir/src/to_egglog/expr.rs, the lower_stmt catch-all returns Err(IrError::Unsupported(...)) for any unhandled statement type. Several program-level declaration variants -- ModuleDecl, ModuleImport, ContractDecl, ContractImpl, EventDecl, and ComptimeBranch -- are collected at the program level by lower_program but are not listed in the skip arm alongside TypeAssign, TraitDecl, ImplBlock, AbiDecl, and ComptimeFn, which are already silently skipped. If any of the missing variants appears in a scope that lower_stmt processes, the compiler produces a hard error with the entire AST node printed via Debug formatting.
These declarative statements should be added to the existing skip arm that returns an empty node, matching the handling already in place for TypeAssign and friends. This is a one-line fix: extend the existing pattern match to include the six missing variants.
🤖 Generated with Claude Code
In crates/ir/src/to_egglog/expr.rs, the
lower_stmtcatch-all returnsErr(IrError::Unsupported(...))for any unhandled statement type. Several program-level declaration variants --ModuleDecl,ModuleImport,ContractDecl,ContractImpl,EventDecl, andComptimeBranch-- are collected at the program level bylower_programbut are not listed in the skip arm alongsideTypeAssign,TraitDecl,ImplBlock,AbiDecl, andComptimeFn, which are already silently skipped. If any of the missing variants appears in a scope thatlower_stmtprocesses, the compiler produces a hard error with the entire AST node printed via Debug formatting.These declarative statements should be added to the existing skip arm that returns an empty node, matching the handling already in place for
TypeAssignand friends. This is a one-line fix: extend the existing pattern match to include the six missing variants.🤖 Generated with Claude Code