[FIR] introduce FirReceiverParameter
^KT-54417
This commit is contained in:
committed by
Space Team
parent
e6801abce8
commit
be7d282974
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -92,7 +92,7 @@ fun FirSimpleFunction.isEquals(): Boolean {
|
||||
if (name != OperatorNameConventions.EQUALS) return false
|
||||
if (valueParameters.size != 1) return false
|
||||
if (contextReceivers.isNotEmpty()) return false
|
||||
if (receiverTypeRef != null) return false
|
||||
if (receiverParameter != null) return false
|
||||
val parameter = valueParameters.first()
|
||||
return parameter.returnTypeRef.isNullableAny
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -189,7 +189,7 @@ class VariableStorageImpl(private val session: FirSession) : VariableStorage() {
|
||||
property.delegate != null -> PropertyStability.DELEGATED_PROPERTY
|
||||
property.isLocal -> if (property.isVal) PropertyStability.STABLE_VALUE else PropertyStability.LOCAL_VAR
|
||||
property.isVar -> PropertyStability.MUTABLE_PROPERTY
|
||||
property.receiverTypeRef != null -> PropertyStability.PROPERTY_WITH_GETTER
|
||||
property.receiverParameter != null -> PropertyStability.PROPERTY_WITH_GETTER
|
||||
property.getter.let { it != null && it !is FirDefaultPropertyAccessor } -> PropertyStability.PROPERTY_WITH_GETTER
|
||||
property.modality != Modality.FINAL -> {
|
||||
val dispatchReceiver = (originalFir.unwrapElement() as? FirQualifiedAccess)?.dispatchReceiver ?: return null
|
||||
|
||||
Reference in New Issue
Block a user