Forbid provideDelegate, setValue and getValue suspend operators

#KT-24866 Fixed
This commit is contained in:
Ilmir Usmanov
2018-09-05 15:41:11 +03:00
parent 34569071b3
commit 6f591369d8
4 changed files with 64 additions and 31 deletions
@@ -26,7 +26,8 @@ import org.jetbrains.kotlin.util.OperatorNameConventions
object SuspendOperatorsCheckers : DeclarationChecker {
private val UNSUPPORTED_OPERATOR_NAMES = setOf(
OperatorNameConventions.CONTAINS,
OperatorNameConventions.GET, OperatorNameConventions.SET
OperatorNameConventions.GET, OperatorNameConventions.SET,
OperatorNameConventions.PROVIDE_DELEGATE, OperatorNameConventions.GET_VALUE, OperatorNameConventions.SET_VALUE
)
override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) {