Add assertion for variable as function call with explicit type parameters.

This commit is contained in:
Stanislav Erokhin
2016-07-25 14:14:20 +03:00
parent b56e84d47f
commit f3be1b8f1f
6 changed files with 5 additions and 17 deletions
@@ -42,7 +42,7 @@ class OperatorCallChecker : CallChecker {
if (resolvedCall is VariableAsFunctionResolvedCall &&
call is CallTransformer.CallForImplicitInvoke && call.itIsVariableAsFunctionCall) {
val outerCall = call.outerCall
if (isConventionCall(outerCall)) {
if (isConventionCall(outerCall) || outerCall.typeArguments.isNotEmpty()) {
throw AssertionError("Illegal resolved call to variable with invoke for $outerCall. " +
"Variable: ${resolvedCall.variableCall.resultingDescriptor}")
}