IR: put resolution of unbound type parameter symbols behind a language version flag

This commit is contained in:
Georgy Bronnikov
2020-04-15 16:08:35 +03:00
parent a1a2da3c0f
commit 284533f72b
@@ -53,7 +53,6 @@ class ExternalDependenciesGenerator(
} }
} while (unbound.isNotEmpty()) } while (unbound.isNotEmpty())
} }
}
private val SymbolTable.allUnbound: List<IrSymbol> private val SymbolTable.allUnbound: List<IrSymbol>
get() { get() {
@@ -65,9 +64,12 @@ private val SymbolTable.allUnbound: List<IrSymbol>
r.addAll(unboundSimpleFunctions) r.addAll(unboundSimpleFunctions)
r.addAll(unboundProperties) r.addAll(unboundProperties)
r.addAll(unboundTypeAliases) r.addAll(unboundTypeAliases)
if (!languageVersionSettings.supportsFeature(LanguageFeature.NewInference)) {
r.addAll(unboundTypeParameters) r.addAll(unboundTypeParameters)
}
return r return r
} }
}
fun List<IrProvider>.getDeclaration(symbol: IrSymbol): IrDeclaration = fun List<IrProvider>.getDeclaration(symbol: IrSymbol): IrDeclaration =
firstNotNullResult { provider -> firstNotNullResult { provider ->