8316953259
For diagnostics without any parameters, the given text is simply rendered as a String, so no symbols should be escaped. For diagnostics with parameters, the format in java.text.MessageFormat is used, so one single quote is erased and two single quotes become one single quote in the rendered text.
45 lines
594 B
Plaintext
Vendored
45 lines
594 B
Plaintext
Vendored
// FILE: first.before.kt
|
|
// "Import" "true"
|
|
// ERROR: 'operator' modifier is required on 'set' in 'some.Some'
|
|
|
|
package testing
|
|
|
|
import some.Some
|
|
|
|
fun foo(): Some = Some()
|
|
|
|
fun testing() {
|
|
foo()<caret>["str"] = 1
|
|
}
|
|
|
|
|
|
|
|
// FILE: second.kt
|
|
package some
|
|
|
|
public class Some {
|
|
fun set(s: String, i: Int) {}
|
|
}
|
|
|
|
operator fun Some.set(s: String, i: Int) {}
|
|
|
|
|
|
|
|
// FILE: first.after.kt
|
|
// "Import" "true"
|
|
// ERROR: 'operator' modifier is required on 'set' in 'some.Some'
|
|
|
|
package testing
|
|
|
|
import some.Some
|
|
import some.set
|
|
|
|
fun foo(): Some = Some()
|
|
|
|
fun testing() {
|
|
foo()<caret>["str"] = 1
|
|
}
|
|
|
|
|
|
|