Review fixes
This commit is contained in:
+1
@@ -71,6 +71,7 @@ internal class SpecialDescriptorsFactory(val context: Context) {
|
|||||||
|
|
||||||
bridgeDescriptor.initialize(
|
bridgeDescriptor.initialize(
|
||||||
extensionReceiverType,
|
extensionReceiverType,
|
||||||
|
// TODO: bug in descriptor - https://youtrack.jetbrains.com/issue/KT-16438.
|
||||||
(descriptor.containingDeclaration as ClassDescriptor).thisAsReceiverParameter,
|
(descriptor.containingDeclaration as ClassDescriptor).thisAsReceiverParameter,
|
||||||
descriptor.typeParameters,
|
descriptor.typeParameters,
|
||||||
descriptor.valueParameters.mapIndexed { index, valueParameterDescriptor ->
|
descriptor.valueParameters.mapIndexed { index, valueParameterDescriptor ->
|
||||||
|
|||||||
+6
-4
@@ -240,13 +240,15 @@ internal class BridgeDirections(val array: Array<BridgeDirection>) {
|
|||||||
fun allNotNeeded(): Boolean = array.all { it == BridgeDirection.NOT_NEEDED }
|
fun allNotNeeded(): Boolean = array.all { it == BridgeDirection.NOT_NEEDED }
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return String(array.map {
|
val result = StringBuilder()
|
||||||
when (it) {
|
array.forEach {
|
||||||
|
result.append(when (it) {
|
||||||
BridgeDirection.FROM_VALUE_TYPE -> 'U' // unbox
|
BridgeDirection.FROM_VALUE_TYPE -> 'U' // unbox
|
||||||
BridgeDirection.TO_VALUE_TYPE -> 'B' // box
|
BridgeDirection.TO_VALUE_TYPE -> 'B' // box
|
||||||
BridgeDirection.NOT_NEEDED -> 'N' // none
|
BridgeDirection.NOT_NEEDED -> 'N' // none
|
||||||
}
|
})
|
||||||
}.toCharArray())
|
}
|
||||||
|
return result.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
|
|||||||
Reference in New Issue
Block a user