Support extensions in functional supertypes

Under a flag for now.
This commit is contained in:
Ilmir Usmanov
2021-10-13 00:18:27 +02:00
committed by teamcityserver
parent 10101dc2b4
commit 3f8fa3149b
17 changed files with 118 additions and 2 deletions
@@ -583,7 +583,9 @@ public class BodyResolver {
if (classDescriptor != null) {
if (ErrorUtils.isError(classDescriptor)) continue;
if (FunctionTypesKt.isExtensionFunctionType(supertype)) {
if (FunctionTypesKt.isExtensionFunctionType(supertype) &&
!languageVersionSettings.supportsFeature(LanguageFeature.FunctionalTypeWithExtensionAsSupertype)
) {
trace.report(SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE.on(typeReference));
}
else if (FunctionTypesKt.isSuspendFunctionType(supertype) &&