fix constant inliner glitch
This commit is contained in:
parent
36db711827
commit
7215e8e39a
2 changed files with 6 additions and 0 deletions
|
@ -138,6 +138,11 @@ impl<'ast, T: Field> Folder<'ast, T> for ConstantInliner<'ast, T> {
|
|||
match c {
|
||||
// replace constants by their concrete value in declaration types
|
||||
DeclarationConstant::Constant(id) => {
|
||||
let id = CanonicalConstantIdentifier {
|
||||
module: self.fold_module_id(id.module),
|
||||
..id
|
||||
};
|
||||
|
||||
DeclarationConstant::Concrete(match self.get_constant(&id).unwrap() {
|
||||
TypedExpression::Uint(UExpression {
|
||||
inner: UExpressionInner::Value(v),
|
||||
|
|
|
@ -894,6 +894,7 @@ pub fn fold_declaration_function_key<'ast, T: Field, F: Folder<'ast, T>>(
|
|||
key: DeclarationFunctionKey<'ast>,
|
||||
) -> DeclarationFunctionKey<'ast> {
|
||||
DeclarationFunctionKey {
|
||||
module: f.fold_module_id(key.module),
|
||||
signature: f.fold_signature(key.signature),
|
||||
..key
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue