Do not override collection stub, if the override is suspend

but the stub is not. The other way around should be OK.

 #KT-52237 Fixed
This commit is contained in:
Ilmir Usmanov
2022-05-04 23:33:28 +02:00
committed by teamcity
parent b19b265735
commit 4f53b085ec
11 changed files with 199 additions and 0 deletions
@@ -205,6 +205,7 @@ internal class CollectionStubMethodLowering(val context: JvmBackendContext) : Cl
if (superFun.name != overridingFun.name) return false
if (superFun.typeParameters.size != overridingFun.typeParameters.size) return false
if (superFun.valueParameters.size != overridingFun.valueParameters.size) return false
if (!superFun.isSuspend && overridingFun.isSuspend) return false
val typeChecker = createTypeCheckerState(superFun, overridingFun)