Extract interface from CompilerMessageLocation to ease extension

The CompilerMessageLocation is an implicit part of the binary daemon
protocol so changing it breaks compatibility with older daemons.
This change allows to extend location for non-daemon uses without
breaking the binary protocol.
This commit is contained in:
Ilya Chernikov
2020-06-04 19:32:05 +02:00
parent f1906bc966
commit 5e33612238
38 changed files with 119 additions and 124 deletions
@@ -16,7 +16,7 @@
package org.jetbrains.kotlin.incremental.utils
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSourceLocation
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
import java.util.*
@@ -24,7 +24,7 @@ import java.util.*
class TestMessageCollector : MessageCollector {
val errors = ArrayList<String>()
override fun report(severity: CompilerMessageSeverity, message: String, location: CompilerMessageLocation?) {
override fun report(severity: CompilerMessageSeverity, message: String, location: CompilerMessageSourceLocation?) {
if (severity.isError) {
errors.add(message)
}