reWrapType

@NotNull
open fun reWrapType(@NotNull oldChain: @NotNull Type, @NotNull newRoot: @NotNull Type): @NotNull Type

Reconstructs the type chain when the root node is modified e.g. when swapping with alias (typedef)

Return

oldchain but root replaced with newRoot

Parameters

oldChain

containing all types until the root

newRoot

root the chain is swapped with