[FIR] Change type of argumentMapping properties and parameters from Map
to LinkedHashMap, to signify that the order is important and we don't assume that mutableMapOf() will always return a LinkedHashMap.
This commit is contained in:
committed by
teamcityserver
parent
6b83f2d70e
commit
e175e87225
@@ -22,7 +22,7 @@ fun buildBinaryArgumentList(left: FirExpression, right: FirExpression): FirArgum
|
||||
fun buildArraySetArgumentList(rValue: FirExpression, indexes: List<FirExpression>): FirArgumentList =
|
||||
FirArraySetArgumentList(rValue, indexes)
|
||||
|
||||
fun buildResolvedArgumentList(mapping: Map<FirExpression, FirValueParameter>): FirArgumentList =
|
||||
fun buildResolvedArgumentList(mapping: LinkedHashMap<FirExpression, FirValueParameter>): FirArgumentList =
|
||||
FirResolvedArgumentList(mapping)
|
||||
|
||||
object FirEmptyArgumentList : FirAbstractArgumentList() {
|
||||
|
||||
@@ -40,7 +40,7 @@ inline val FirCall.arguments: List<FirExpression> get() = argumentList.arguments
|
||||
|
||||
inline val FirCall.argument: FirExpression get() = argumentList.arguments.first()
|
||||
|
||||
inline val FirCall.argumentMapping: Map<FirExpression, FirValueParameter>?
|
||||
inline val FirCall.argumentMapping: LinkedHashMap<FirExpression, FirValueParameter>?
|
||||
get() = (argumentList as? FirResolvedArgumentList)?.mapping
|
||||
|
||||
fun FirExpression.toResolvedCallableReference(): FirResolvedNamedReference? {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import org.jetbrains.kotlin.fir.expressions.FirExpression
|
||||
import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
|
||||
class FirResolvedArgumentList internal constructor(
|
||||
val mapping: Map<FirExpression, FirValueParameter>
|
||||
val mapping: LinkedHashMap<FirExpression, FirValueParameter>
|
||||
) : FirAbstractArgumentList() {
|
||||
override val arguments: List<FirExpression>
|
||||
get() = mapping.keys.toList()
|
||||
|
||||
Reference in New Issue
Block a user