FIR: Fix INFERENCE_NO_INFORMATION_FOR_PARAMETER on type alias with generic expansion

^KT-46996 Fixed
This commit is contained in:
Denis.Zharkov
2021-05-27 18:41:36 +03:00
committed by TeamCityServer
parent d76db0e011
commit 5ade831665
10 changed files with 12 additions and 21 deletions
@@ -178,7 +178,9 @@ private fun processConstructors(
val outerType = bodyResolveComponents.outerClassManager.outerType(type)
if (basicScope != null && (matchedSymbol.fir.typeParameters.isNotEmpty() || outerType != null)) {
if (basicScope != null &&
(matchedSymbol.fir.typeParameters.isNotEmpty() || outerType != null || type.typeArguments.isNotEmpty())
) {
TypeAliasConstructorsSubstitutingScope(
matchedSymbol,
basicScope,
@@ -213,10 +215,6 @@ private class TypeAliasConstructorsSubstitutingScope(
private val outerType: ConeClassLikeType?,
) : FirScope() {
init {
require(outerType != null || typeAliasSymbol.fir.typeParameters.isNotEmpty())
}
override fun processDeclaredConstructors(processor: (FirConstructorSymbol) -> Unit) {
delegatingScope.processDeclaredConstructors wrapper@{ originalConstructorSymbol ->
val typeParameters = typeAliasSymbol.fir.typeParameters