'createDelegate' operator declaration
This commit is contained in:
committed by
Stanislav Erokhin
parent
558e8aaebb
commit
d3ab0f066e
@@ -21,6 +21,8 @@ import org.jetbrains.kotlin.name.Name
|
||||
object OperatorNameConventions {
|
||||
@JvmField val GET_VALUE = Name.identifier("getValue")
|
||||
@JvmField val SET_VALUE = Name.identifier("setValue")
|
||||
@JvmField val PROPERTY_DELEGATED = Name.identifier("propertyDelegated")
|
||||
@JvmField val CREATE_DELEGATE = Name.identifier("createDelegate")
|
||||
|
||||
@JvmField val EQUALS = Name.identifier("equals")
|
||||
@JvmField val COMPARE_TO = Name.identifier("compareTo")
|
||||
@@ -62,9 +64,6 @@ object OperatorNameConventions {
|
||||
@JvmField val COROUTINE_HANDLE_EXCEPTION = Name.identifier("handleException")
|
||||
@JvmField val COROUTINE_INTERCEPT_RESUME = Name.identifier("interceptResume")
|
||||
|
||||
|
||||
@JvmField val PROPERTY_DELEGATED = Name.identifier("propertyDelegated")
|
||||
|
||||
// If you add new unary, binary or assignment operators, add it to OperatorConventions as well
|
||||
|
||||
@JvmField
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.jetbrains.kotlin.util.OperatorNameConventions.CONTAINS
|
||||
import org.jetbrains.kotlin.util.OperatorNameConventions.COROUTINE_HANDLE_EXCEPTION
|
||||
import org.jetbrains.kotlin.util.OperatorNameConventions.COROUTINE_HANDLE_RESULT
|
||||
import org.jetbrains.kotlin.util.OperatorNameConventions.COROUTINE_INTERCEPT_RESUME
|
||||
import org.jetbrains.kotlin.util.OperatorNameConventions.CREATE_DELEGATE
|
||||
import org.jetbrains.kotlin.util.OperatorNameConventions.DEC
|
||||
import org.jetbrains.kotlin.util.OperatorNameConventions.EQUALS
|
||||
import org.jetbrains.kotlin.util.OperatorNameConventions.GET
|
||||
@@ -185,6 +186,7 @@ object OperatorChecks : AbstractModifierChecks() {
|
||||
},
|
||||
Checks(GET_VALUE, MemberOrExtension, NoDefaultAndVarargsCheck, ValueParameterCountCheck.AtLeast(2), IsKPropertyCheck),
|
||||
Checks(SET_VALUE, MemberOrExtension, NoDefaultAndVarargsCheck, ValueParameterCountCheck.AtLeast(3), IsKPropertyCheck),
|
||||
Checks(CREATE_DELEGATE, MemberOrExtension, NoDefaultAndVarargsCheck, ValueParameterCountCheck.Equals(2), IsKPropertyCheck),
|
||||
Checks(INVOKE, MemberOrExtension),
|
||||
Checks(CONTAINS, MemberOrExtension, SingleValueParameter, NoDefaultAndVarargsCheck, ReturnsBoolean),
|
||||
Checks(ITERATOR, MemberOrExtension, NoValueParameters),
|
||||
|
||||
Reference in New Issue
Block a user