seems to be used in the real Compose plugin. I’m trying to understand what the difference is between these two and why you’d use one over the other.
d
dmitriy.novozhilov
10/02/2024, 7:20 AM
The main usecase for
TypeRemapper
is a task "updated types in the IR (sub)tree by given rules"
The purpose of substitutor is to update some specific type/type pattern inside some given type, e.g.
Copy code
type: Map<List<T>, T>
substitution: { T -> Int }
substituted type: Map<List<Int>, Int>
As I can see, in real compose the second usecase is more relevant (underlyingRemapType, for example, replicates the logic of substitutor), so I would say the substitutor approach will be better here