Don't silently ignore argument mismatch for provide delegate

#KT-39816 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2020-06-26 11:04:43 +03:00
parent ea5fef76d1
commit a87b25d10e
9 changed files with 92 additions and 2 deletions
@@ -571,7 +571,7 @@ class DelegatedPropertyResolver(
variableDescriptor, delegateExpression, delegateTypeWithoutNonFixedVariables, contextForProvideDelegate
)
if (conventionMethodFound(provideDelegateResults)) {
if (provideDelegateResults.isSuccess) {
val provideDelegateDescriptor = provideDelegateResults.resultingDescriptor
if (provideDelegateDescriptor.isOperator) {
delegateType = inverseSubstitution(provideDelegateDescriptor.returnType, substitutionMap) ?: return null