Backoff for InlineProperties on structural type mismatches
This brings InlineProperties more in line with AmbiguateProperties in terms
of how its invalidations are configured.
@@ -60,11 +60,14 @@ final class InlineProperties implements CompilerPass {
InlineProperties(AbstractCompiler compiler) {
this.compiler = compiler;
- this.invalidatingTypes = new InvalidatingTypes.Builder(compiler.getTypeRegistry())
+ this.invalidatingTypes =
+ new InvalidatingTypes.Builder(compiler.getTypeRegistry())
// NOTE: Mismatches are less important to this pass than to (dis)ambiguate properties.
// This pass doesn't remove values (it only inlines them when the type is known), so
- // it isn't necessary to invalidate due to implicit interface uses.
+ // it isn't necessary to invalidate due to implicit interface uses, but we do so anyway
+ // for consistency with the other type-based optimizations.
.addAllTypeMismatches(compiler.getTypeMismatches())
+ .addAllTypeMismatches(compiler.getImplicitInterfaceUses())
.build();
invalidateExternProperties();
}
