FIR: Rename SAM constructor parameter name from "block" to "function".
This matches FE 1.0 (see core/descriptors/src/org/jetbrains/kotlin/resolve/sam/samConstructorUtils.kt).
This commit is contained in:
committed by
TeamCityServer
parent
d16454b9af
commit
56cc40f639
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
KtFunctionCall:
|
KtFunctionCall:
|
||||||
argumentMapping = { {x: Int, y: Int -> 1} -> (block: kotlin.Function2<ft<kotlin.Int, kotlin.Int?>, ft<kotlin.Int, kotlin.Int?>, kotlin.Int>) }
|
argumentMapping = { {x: Int, y: Int -> 1} -> (function: kotlin.Function2<ft<kotlin.Int, kotlin.Int?>, ft<kotlin.Int, kotlin.Int?>, kotlin.Int>) }
|
||||||
targetFunction = java/util/Comparator(block: kotlin.Function2<ft<kotlin.Int, kotlin.Int?>, ft<kotlin.Int, kotlin.Int?>, kotlin.Int>): java.util.Comparator<ft<kotlin.Int, kotlin.Int?>>
|
targetFunction = java/util/Comparator(function: kotlin.Function2<ft<kotlin.Int, kotlin.Int?>, ft<kotlin.Int, kotlin.Int?>, kotlin.Int>): java.util.Comparator<ft<kotlin.Int, kotlin.Int?>>
|
||||||
substitutor = <map substitutor: {FirTypeParameterSymbol T=ft<kotlin/Int, kotlin/Int?>}>
|
substitutor = <map substitutor: {FirTypeParameterSymbol T=ft<kotlin/Int, kotlin/Int?>}>
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
Resolved to:
|
Resolved to:
|
||||||
0: (in java.util) fun <T : kotlin.Any!> Comparator(block: (T!, T!) -> kotlin.Int): java.util.Comparator<T>
|
0: (in java.util) fun <T : kotlin.Any!> Comparator(function: (T!, T!) -> kotlin.Int): java.util.Comparator<T>
|
||||||
|
|||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
Resolved to:
|
Resolved to:
|
||||||
0: (in java.util) fun <T : kotlin.Any!> Comparator(block: (T!, T!) -> kotlin.Int): java.util.Comparator<T>
|
0: (in java.util) fun <T : kotlin.Any!> Comparator(function: (T!, T!) -> kotlin.Int): java.util.Comparator<T>
|
||||||
|
|||||||
+1
-1
@@ -8,6 +8,6 @@ KtFirSamConstructorSymbol:
|
|||||||
receiverType: null
|
receiverType: null
|
||||||
symbolKind: SAM_CONSTRUCTOR
|
symbolKind: SAM_CONSTRUCTOR
|
||||||
valueParameters: [
|
valueParameters: [
|
||||||
KtFirValueParameterSymbol(block)
|
KtFirValueParameterSymbol(function)
|
||||||
]
|
]
|
||||||
deprecationStatus: null
|
deprecationStatus: null
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ abstract class FirSamResolver {
|
|||||||
abstract fun getSamConstructor(firRegularClass: FirRegularClass): FirSimpleFunction?
|
abstract fun getSamConstructor(firRegularClass: FirRegularClass): FirSimpleFunction?
|
||||||
}
|
}
|
||||||
|
|
||||||
private val SAM_PARAMETER_NAME = Name.identifier("block")
|
private val SAM_PARAMETER_NAME = Name.identifier("function")
|
||||||
|
|
||||||
class FirSamResolverImpl(
|
class FirSamResolverImpl(
|
||||||
private val session: FirSession,
|
private val session: FirSession,
|
||||||
|
|||||||
Reference in New Issue
Block a user