[FIR] Properly match expect fun interfaces with java interfaces

This commit is contained in:
Dmitriy Novozhilov
2023-06-06 18:41:06 +03:00
committed by Space Team
parent 1418a2bcb8
commit 29afd0dc97
4 changed files with 39 additions and 3 deletions
@@ -79,8 +79,13 @@ class FirExpectActualMatchingContext(
get() = asSymbol().resolvedStatus.isInline
override val RegularClassSymbolMarker.isValue: Boolean
get() = asSymbol().resolvedStatus.isInline
/*
* In this context java interfaces should be considered as not fun interface, so they will be later checked by [isNotSamInterface] function
*/
override val RegularClassSymbolMarker.isFun: Boolean
get() = asSymbol().resolvedStatus.isFun
get() = asSymbol().takeUnless { it.origin is FirDeclarationOrigin.Java }?.resolvedStatus?.isFun ?: false
override val ClassLikeSymbolMarker.typeParameters: List<TypeParameterSymbolMarker>
get() = asSymbol().typeParameterSymbols