[IR] User-friendly message about unexpected unlinked symbols
^KT-53649
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.ir.util
|
||||
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.config.CompilerConfigurationKey
|
||||
|
||||
interface IrMessageLogger {
|
||||
@@ -25,4 +26,7 @@ interface IrMessageLogger {
|
||||
@JvmStatic
|
||||
val IR_MESSAGE_LOGGER = CompilerConfigurationKey<IrMessageLogger>("ir message logger")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val CompilerConfiguration.irMessageLogger: IrMessageLogger
|
||||
get() = this[IrMessageLogger.IR_MESSAGE_LOGGER] ?: IrMessageLogger.None
|
||||
|
||||
@@ -1177,10 +1177,3 @@ val SymbolTable.allUnbound: Set<IrSymbol>
|
||||
addUnbound(unboundTypeAliases)
|
||||
addUnbound(unboundTypeParameters)
|
||||
}
|
||||
|
||||
fun SymbolTable.noUnboundLeft(message: String) {
|
||||
val unbound = this.allUnbound
|
||||
assert(unbound.isEmpty()) {
|
||||
message + "\n" + unbound.joinToString("\n")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user