Psi2Ir: Fix SAM conversion with new inference

This commit is contained in:
Steven Schäfer
2020-08-21 11:21:51 +02:00
committed by Dmitry Petrov
parent 75891e860b
commit 44ffb1fb3e
8 changed files with 49 additions and 16 deletions
@@ -16,7 +16,6 @@
package org.jetbrains.kotlin.ir.util
import org.jetbrains.kotlin.config.LanguageFeature
import org.jetbrains.kotlin.config.LanguageVersionSettings
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
import org.jetbrains.kotlin.ir.declarations.IrDeclaration
@@ -32,11 +31,6 @@ class ExternalDependenciesGenerator(
private val languageVersionSettings: LanguageVersionSettings
) {
fun generateUnboundSymbolsAsDependencies() {
if (languageVersionSettings.supportsFeature(LanguageFeature.NewInference)) {
require(symbolTable.unboundTypeParameters.isEmpty()) {
"Unbound type parameters are forbidden: ${symbolTable.unboundTypeParameters}"
}
}
// There should be at most one DeclarationStubGenerator (none in closed world?)
irProviders.singleOrNull { it is DeclarationStubGenerator }?.let {
(it as DeclarationStubGenerator).unboundSymbolGeneration = true