Suspend lambdas can't have value parameters (UNSUPPORTED in M04).

This commit is contained in:
Dmitry Petrov
2016-12-15 16:36:49 +03:00
committed by Stanislav Erokhin
parent c5aeaae8e6
commit f19581dc4d
12 changed files with 30 additions and 11 deletions
@@ -220,6 +220,9 @@ class TypeResolver(
val receiverTypeRef = type.receiverTypeReference
val receiverType = if (receiverTypeRef == null) null else resolveType(c.noBareTypes(), receiverTypeRef)
if (hasSuspendModifier && type.parameters.isNotEmpty()) {
c.trace.report(UNSUPPORTED.on(type, "suspend function type with value parameters"))
}
val parameterDescriptors = resolveParametersOfFunctionType(type.parameters)
val returnTypeRef = type.returnTypeReference