Cleanup deprecated symbol usages in testData
This commit is contained in:
@@ -39,7 +39,7 @@ abstract class Tag(val name: String) : Element() {
|
||||
|
||||
private fun renderAttributes(): String? {
|
||||
val builder = StringBuilder()
|
||||
for (a in attributes.keySet()) {
|
||||
for (a in attributes.keys) {
|
||||
builder.append(" $a=\"${attributes[a]}\"")
|
||||
}
|
||||
return builder.toString()
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ abstract class Tag(val name: String) : Element() {
|
||||
|
||||
private fun renderAttributes(): String? {
|
||||
val builder = StringBuilder()
|
||||
for (a in attributes.keySet()) {
|
||||
for (a in attributes.keys) {
|
||||
builder.append(" $a=\"${attributes[a]}\"")
|
||||
}
|
||||
return builder.toString()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
fun test1(): Int {
|
||||
val inlineX = Inline()
|
||||
return inlineX.foo({ z: Int -> "" + z}, 25, fun String.(): Int = this.length())
|
||||
return inlineX.foo({ z: Int -> "" + z}, 25, fun String.(): Int = this.length)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
Vendored
+1
-1
@@ -3,7 +3,7 @@ package test
|
||||
public class Holder(var value: String = "") {
|
||||
|
||||
operator fun plusAssign(s: String?) {
|
||||
if (value.length() != 0) {
|
||||
if (value.length != 0) {
|
||||
value += " -> "
|
||||
}
|
||||
value += s
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package test
|
||||
public class Holder(var value: String = "") {
|
||||
|
||||
operator fun plusAssign(s: String?) {
|
||||
if (value.length() != 0) {
|
||||
if (value.length != 0) {
|
||||
value += " -> "
|
||||
}
|
||||
value += s
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ class Test() : MCloseable {
|
||||
throw MyException("exception")
|
||||
}
|
||||
catch (e: MyException) {
|
||||
status += e.getMessage()
|
||||
status += e.message
|
||||
return status
|
||||
}
|
||||
finally {
|
||||
|
||||
Vendored
+2
-2
@@ -32,8 +32,8 @@ fun test0(h: Holder): String {
|
||||
return localResult;
|
||||
}
|
||||
catch (e: RuntimeException) {
|
||||
if (e.getMessage() != "FINALLY") {
|
||||
return "FAIL in exception: " + e.getMessage()
|
||||
if (e.message != "FINALLY") {
|
||||
return "FAIL in exception: " + e.message
|
||||
}
|
||||
else {
|
||||
return "CATCHED_EXCEPTION"
|
||||
|
||||
compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.1.kt
Vendored
+2
-2
@@ -56,9 +56,9 @@ fun test0(
|
||||
}, res)
|
||||
return localResult;
|
||||
} catch(e: Exception1) {
|
||||
return e.getMessage()!!
|
||||
return e.message!!
|
||||
} catch(e: Exception2) {
|
||||
return e.getMessage()!!
|
||||
return e.message!!
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -28,9 +28,9 @@ fun test0(
|
||||
}, res)
|
||||
return localResult;
|
||||
} catch(e: Exception1) {
|
||||
return e.getMessage()!!
|
||||
return e.message!!
|
||||
} catch(e: Exception2) {
|
||||
return e.getMessage()!!
|
||||
return e.message!!
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -76,8 +76,8 @@ fun test5(h: Holder): String {
|
||||
|
||||
return localResult;
|
||||
} catch (e: RuntimeException) {
|
||||
if (e.getMessage() != "EXCEPTION") {
|
||||
return "FAIL in exception: " + e.getMessage()
|
||||
if (e.message != "EXCEPTION") {
|
||||
return "FAIL in exception: " + e.message
|
||||
} else {
|
||||
return "CATCHED_EXCEPTION"
|
||||
}
|
||||
|
||||
+6
-6
@@ -28,8 +28,8 @@ fun test0(h: Holder): String {
|
||||
return localResult;
|
||||
}
|
||||
catch (e: RuntimeException) {
|
||||
if (e.getMessage() != "FINALLY") {
|
||||
return "FAIL in exception: " + e.getMessage()
|
||||
if (e.message != "FINALLY") {
|
||||
return "FAIL in exception: " + e.message
|
||||
}
|
||||
else {
|
||||
return "CATCHED_EXCEPTION"
|
||||
@@ -108,8 +108,8 @@ fun test1(h: Holder): String {
|
||||
}, "Fail")
|
||||
}
|
||||
catch (e: RuntimeException) {
|
||||
if (e.getMessage() != "FINALLY") {
|
||||
return "FAIL in exception: " + e.getMessage()
|
||||
if (e.message != "FINALLY") {
|
||||
return "FAIL in exception: " + e.message
|
||||
}
|
||||
else {
|
||||
return "CATCHED_EXCEPTION"
|
||||
@@ -172,8 +172,8 @@ fun test3(h: Holder): String {
|
||||
}, "Fail")
|
||||
}
|
||||
catch (e: RuntimeException) {
|
||||
if (e.getMessage() != "FINALLY") {
|
||||
return "FAIL in exception: " + e.getMessage()
|
||||
if (e.message != "FINALLY") {
|
||||
return "FAIL in exception: " + e.message
|
||||
}
|
||||
else {
|
||||
return "CATCHED_EXCEPTION"
|
||||
|
||||
Vendored
+8
-8
@@ -23,8 +23,8 @@ fun test0(h: Holder): String {
|
||||
|
||||
return localResult;
|
||||
} catch (e: RuntimeException) {
|
||||
if (e.getMessage() != "FINALLY") {
|
||||
return "FAIL in exception: " + e.getMessage()
|
||||
if (e.message != "FINALLY") {
|
||||
return "FAIL in exception: " + e.message
|
||||
} else {
|
||||
return "CATCHED_EXCEPTION"
|
||||
}
|
||||
@@ -51,8 +51,8 @@ fun test1(h: Holder): String {
|
||||
"OK_FINALLY"
|
||||
})
|
||||
} catch (e: RuntimeException) {
|
||||
if (e.getMessage() != "FINALLY") {
|
||||
return "FAIL in exception: " + e.getMessage()
|
||||
if (e.message != "FINALLY") {
|
||||
return "FAIL in exception: " + e.message
|
||||
} else {
|
||||
return "CATCHED_EXCEPTION"
|
||||
}
|
||||
@@ -100,8 +100,8 @@ fun test3(h: Holder): String {
|
||||
"OK_FINALLY"
|
||||
})
|
||||
} catch (e: RuntimeException) {
|
||||
if (e.getMessage() != "FINALLY") {
|
||||
return "FAIL in exception: " + e.getMessage()
|
||||
if (e.message != "FINALLY") {
|
||||
return "FAIL in exception: " + e.message
|
||||
} else {
|
||||
return "CATCHED_EXCEPTION"
|
||||
}
|
||||
@@ -128,8 +128,8 @@ fun test4(h: Holder): String {
|
||||
"OK_FINALLY"
|
||||
})
|
||||
} catch (e: RuntimeException) {
|
||||
if (e.getMessage() != "EXCEPTION") {
|
||||
return "FAIL in exception: " + e.getMessage()
|
||||
if (e.message != "EXCEPTION") {
|
||||
return "FAIL in exception: " + e.message
|
||||
} else {
|
||||
return "CATCHED_EXCEPTION"
|
||||
}
|
||||
|
||||
compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.1.kt
Vendored
+2
-2
@@ -30,9 +30,9 @@ fun test0(
|
||||
res)
|
||||
return localResult;
|
||||
} catch(e: Exception1) {
|
||||
return e.getMessage()!!
|
||||
return e.message!!
|
||||
} catch(e: Exception2) {
|
||||
return e.getMessage()!!
|
||||
return e.message!!
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.2.kt
Vendored
+1
-1
@@ -3,7 +3,7 @@ package test
|
||||
public class Holder(var value: String = "") {
|
||||
|
||||
operator fun plusAssign(s: String?) {
|
||||
if (value.length() != 0) {
|
||||
if (value.length != 0) {
|
||||
value += " -> "
|
||||
}
|
||||
value += s
|
||||
|
||||
@@ -4,7 +4,7 @@ inline fun <T> bar(arg: String, action: () -> T) {
|
||||
try {
|
||||
action()
|
||||
} finally {
|
||||
arg.length()
|
||||
arg.length
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ public class ClassA {
|
||||
|
||||
result = name + name2
|
||||
|
||||
val length = name.length()
|
||||
val length = name.length
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ package test
|
||||
public inline fun <reified T: Any> Any.inlineMeIfYouCan() : () -> Runnable = {
|
||||
object : Runnable {
|
||||
override fun run() {
|
||||
javaClass<T>().newInstance()
|
||||
T::class.java.newInstance()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,6 @@ enum class MyEnum {
|
||||
|
||||
//TODO: KT-4693
|
||||
inline fun <T> doSmth(a: T) : String {
|
||||
return a.toString() + K.name()
|
||||
return a.toString() + K.name
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ fun test2() : Int {
|
||||
}
|
||||
return result
|
||||
} catch (e: RuntimeException) {
|
||||
return e.getMessage()!!.toInt2()!!
|
||||
return e.message!!.toInt2()!!
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ fun test11(): Int {
|
||||
}
|
||||
},
|
||||
{ ex, thizz ->
|
||||
if (ex.getMessage() == "2") {
|
||||
if (ex.message == "2") {
|
||||
thizz.value
|
||||
} else {
|
||||
-11111
|
||||
@@ -66,7 +66,7 @@ fun test3(): Int {
|
||||
})
|
||||
return res
|
||||
} catch (e: RuntimeException) {
|
||||
return e.getMessage()?.toInt2()!!
|
||||
return e.message?.toInt2()!!
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ fun test33(): Int {
|
||||
}
|
||||
},
|
||||
{ ex, thizz ->
|
||||
if (ex.getMessage() == "-2") {
|
||||
if (ex.message == "-2") {
|
||||
throw RuntimeException("-3")
|
||||
} else {
|
||||
-11111
|
||||
@@ -89,7 +89,7 @@ fun test33(): Int {
|
||||
})
|
||||
return res
|
||||
} catch (e: RuntimeException) {
|
||||
return e.getMessage()!!.toInt2()!!
|
||||
return e.message!!.toInt2()!!
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ fun test3(): Int {
|
||||
})
|
||||
return res
|
||||
} catch (e: RuntimeException) {
|
||||
return e.getMessage()?.toInt()!!
|
||||
return e.message?.toInt()!!
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user