Fix missing lens rewriting of root consequences in native interpretation
Bug: b/323816623
Change-Id: Ifd318787294cd8c3fee51ea9811d294bffe20b44
diff --git a/src/main/java/com/android/tools/r8/shaking/rules/MaterializedRules.java b/src/main/java/com/android/tools/r8/shaking/rules/MaterializedRules.java
index c66cdf1..ad3f8f6 100644
--- a/src/main/java/com/android/tools/r8/shaking/rules/MaterializedRules.java
+++ b/src/main/java/com/android/tools/r8/shaking/rules/MaterializedRules.java
@@ -31,11 +31,11 @@
}
public MaterializedRules rewriteWithLens(NonIdentityGraphLens lens) {
- // The preconditions of these are not rewritten. We assume witnessing instructions
- // to cary the original references to deem them effectively live.
+ // The conditional rules are not rewritten. We assume witnessing instructions to carry the
+ // original references to deem them effectively live.
// TODO(b/323816623): Do we need to rewrite the consequent sets? Or would the constraints
// always ensure they remain if the keep info needs to be reapplied?
- return this;
+ return new MaterializedRules(rootConsequences.rewrittenWithLens(lens), conditionalRules);
}
public ApplicableRulesEvaluator toApplicableRules() {