Introduce CustomSubstitutionCapability.substitutionToComposeWith
Mainly it's needed to prevent creation of subsituions composition everytime we replacing arguments, because it's both unoptimal and wrong When replace arguments in `A<E, F>` with <String, E> you got `A<String, String>` as a result, that is unexpected. But composition is only needed when previous substituion was abnormal (e.g. RawSubsitution that should actually wrap new arguments), see RawTypes tests
This commit is contained in:
+4
-1
@@ -28,7 +28,10 @@ public object RawTypeTag : TypeCapability
|
||||
|
||||
public object RawTypeCapabilities : TypeCapabilities {
|
||||
private object RawSubstitutionCapability : CustomSubstitutionCapability {
|
||||
override val substitution = RawSubstitution
|
||||
override val substitution: TypeSubstitution?
|
||||
get() = RawSubstitution
|
||||
override val substitutionToComposeWith: TypeSubstitution?
|
||||
get() = RawSubstitution
|
||||
}
|
||||
|
||||
private object RawFlexibleRendering : CustomFlexibleRendering {
|
||||
|
||||
Reference in New Issue
Block a user