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:
+2
-2
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user