Skip to content

Commit

Permalink
fix(optim): manage empty rules used as namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
EmileRolley committed Jan 8, 2024
1 parent b92a793 commit b006a23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/optims/constantFolding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ function isFoldable(
rule: RuleNode | undefined,
contextRules: Set<RuleName>,
): boolean {
if (!rule) {
// We need to keep empty rules as they are used as namespace.
if (!rule || isEmptyRule(rule)) {
return false
}

Expand Down

0 comments on commit b006a23

Please sign in to comment.