K1: render receiver DNN type as parenthesized
^KTIJ-20849
This commit is contained in:
Vendored
+2
-2
@@ -9,7 +9,7 @@ public fun </*0*/ F> bar4(/*0*/ x: F?): kotlin.Unit
|
|||||||
public fun </*0*/ F> bar5(/*0*/ x: F): kotlin.Unit
|
public fun </*0*/ F> bar5(/*0*/ x: F): kotlin.Unit
|
||||||
public fun </*0*/ F> bar6(/*0*/ x: F): kotlin.Unit
|
public fun </*0*/ F> bar6(/*0*/ x: F): kotlin.Unit
|
||||||
public fun </*0*/ F> bar7(/*0*/ x: F & Any): kotlin.Unit
|
public fun </*0*/ F> bar7(/*0*/ x: F & Any): kotlin.Unit
|
||||||
public fun </*0*/ F> bar8(/*0*/ x: F & Any.() -> kotlin.Unit): kotlin.Unit
|
public fun </*0*/ F> bar8(/*0*/ x: (F & Any).() -> kotlin.Unit): kotlin.Unit
|
||||||
public fun </*0*/ T : kotlin.Any> foo(/*0*/ x: T, /*1*/ y: kotlin.collections.List<kotlin.String>): kotlin.Unit
|
public fun </*0*/ T : kotlin.Any> foo(/*0*/ x: T, /*1*/ y: kotlin.collections.List<kotlin.String>): kotlin.Unit
|
||||||
public fun </*0*/ F> F & Any.bar9(/*0*/ x: () -> kotlin.Unit): kotlin.Unit
|
public fun </*0*/ F> (F & Any).bar9(/*0*/ x: () -> kotlin.Unit): kotlin.Unit
|
||||||
|
|
||||||
|
|||||||
@@ -364,7 +364,8 @@ internal class DescriptorRendererImpl(
|
|||||||
|
|
||||||
if (receiverType != null) {
|
if (receiverType != null) {
|
||||||
val surroundReceiver = shouldRenderAsPrettyFunctionType(receiverType) && !receiverType.isMarkedNullable ||
|
val surroundReceiver = shouldRenderAsPrettyFunctionType(receiverType) && !receiverType.isMarkedNullable ||
|
||||||
receiverType.hasModifiersOrAnnotations()
|
receiverType.hasModifiersOrAnnotations() ||
|
||||||
|
receiverType is DefinitelyNotNullType
|
||||||
if (surroundReceiver) {
|
if (surroundReceiver) {
|
||||||
append("(")
|
append("(")
|
||||||
}
|
}
|
||||||
@@ -743,7 +744,7 @@ internal class DescriptorRendererImpl(
|
|||||||
|
|
||||||
private fun KotlinType.renderForReceiver(): String {
|
private fun KotlinType.renderForReceiver(): String {
|
||||||
var result = renderType(this)
|
var result = renderType(this)
|
||||||
if (shouldRenderAsPrettyFunctionType(this) && !TypeUtils.isNullableType(this)) {
|
if ((shouldRenderAsPrettyFunctionType(this) && !TypeUtils.isNullableType(this)) || this is DefinitelyNotNullType) {
|
||||||
result = "($result)"
|
result = "($result)"
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
|
|||||||
Reference in New Issue
Block a user