IR, temporary: a simpler mangling for flexible types

Mangling for flexible types will need another look.
Complicated cases still do not work.
This commit is contained in:
Georgy Bronnikov
2021-03-21 19:44:43 +03:00
committed by TeamCityServer
parent c3f4fcde0b
commit 4af2aaedb1
@@ -198,13 +198,7 @@ abstract class DescriptorMangleComputer(protected val builder: StringBuilder, pr
is DynamicType -> tBuilder.appendSignature(MangleConstant.DYNAMIC_MARK)
is FlexibleType -> {
// TODO: is that correct way to mangle flexible type?
with(MangleConstant.FLEXIBLE_TYPE) {
tBuilder.appendSignature(prefix)
mangleType(tBuilder, type.lowerBound)
tBuilder.appendSignature(separator)
mangleType(tBuilder, type.upperBound)
tBuilder.appendSignature(suffix)
}
mangleType(tBuilder, type.upperBound)
}
else -> error("Unexpected type $wtype")
}