[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
@@ -367,7 +367,12 @@ internal abstract class IrExpectActualMatchingContext(
}
override fun RegularClassSymbolMarker.isNotSamInterface(): Boolean {
// TODO: is it correct for java classes?
/*
* This is incorrect for java classes (because all java interfaces are considered as fun interfaces),
* but it's fine to not to check if some java interfaces is really SAM or not, because if one
* tries to actualize `expect fun interface` with typealias to non-SAM java interface, frontend
* will report an error and IR matching won't be invoked
*/
return !asIr().isFun
}