Fix double quotes in diagnostic messages

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.
This commit is contained in:
Alexander Udalov
2016-03-29 14:13:59 +03:00
parent 484167e9d9
commit 8316953259
41 changed files with 103 additions and 103 deletions
@@ -1,5 +1,5 @@
// IS_APPLICABLE: false
// ERROR: operator modifier is inapplicable on this function: must have no value parameters
// ERROR: 'operator' modifier is inapplicable on this function: must have no value parameters
fun test() {
class Test {
operator fun unaryPlus(fn: () -> Unit): Test = Test()
@@ -1,5 +1,5 @@
// IS_APPLICABLE: false
// ERROR: operator modifier is inapplicable on this function: must have no value parameters
// ERROR: 'operator' modifier is inapplicable on this function: must have no value parameters
fun test() {
class Test {
operator fun unaryPlus(a: Int): Test = Test()
@@ -1,5 +1,5 @@
// IS_APPLICABLE: false
// ERROR: operator modifier is inapplicable on this function: must have no value parameters
// ERROR: 'operator' modifier is inapplicable on this function: must have no value parameters
fun test() {
class Test {
operator fun unaryPlus(vararg a: Int): Test = Test()
@@ -1,5 +1,5 @@
// IS_APPLICABLE: false
// ERROR: operator modifier is inapplicable on this function: must have no value parameters
// ERROR: 'operator' modifier is inapplicable on this function: must have no value parameters
fun test() {
class Test {
operator fun unaryPlus(a: Int): Test = Test()