[FIR] Partial implementation of DEPRECATION(_ERROR) diagnostics
No support for inheritance deprecations and deprecations in qualifier's parts
This commit is contained in:
committed by
teamcityserver
parent
9fad55d551
commit
de3f31cf78
+1
-1
@@ -2,7 +2,7 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
|
||||
interface A<T> {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun test(p: T) {
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -13,7 +13,7 @@ public interface JavaInterface {
|
||||
// FILE: 1.kt
|
||||
|
||||
interface KotlinInterface : JavaInterface {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
override fun test() {}
|
||||
|
||||
override fun testForNonDefault() {}
|
||||
@@ -22,7 +22,7 @@ interface KotlinInterface : JavaInterface {
|
||||
}
|
||||
|
||||
interface KotlinInterface2 : JavaInterface, KotlinInterface {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
override fun test() {}
|
||||
|
||||
override fun testForNonDefault() {}
|
||||
@@ -37,7 +37,7 @@ interface KotlinInterfaceForIndirect : JavaInterface {
|
||||
|
||||
interface KotlinInterfaceIndirectInheritance : KotlinInterfaceForIndirect {
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
override fun test() {}
|
||||
|
||||
override fun testForNonDefault() {}
|
||||
@@ -63,7 +63,7 @@ interface KotlinInterfaceX {
|
||||
}
|
||||
|
||||
interface KotlinInterfaceManySuper: JavaInterface, KotlinInterfaceX {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
override fun test() {}
|
||||
|
||||
override fun testForNonDefault() {}
|
||||
|
||||
Vendored
-69
@@ -1,69 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// !JVM_TARGET: 1.8
|
||||
|
||||
// FILE: JavaInterface.java
|
||||
public interface JavaInterface {
|
||||
default void test() {}
|
||||
|
||||
default void testForNonDefault() {}
|
||||
|
||||
void testAbstract();
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
|
||||
interface KotlinInterface : JavaInterface {
|
||||
@JvmDefault
|
||||
override fun test() {}
|
||||
|
||||
override fun testForNonDefault() {}
|
||||
|
||||
override fun testAbstract() {}
|
||||
}
|
||||
|
||||
interface KotlinInterface2 : JavaInterface, KotlinInterface {
|
||||
override fun test() {}
|
||||
|
||||
override fun testForNonDefault() {}
|
||||
|
||||
override fun testAbstract() {}
|
||||
}
|
||||
|
||||
|
||||
interface KotlinInterfaceForIndirect : JavaInterface {
|
||||
|
||||
}
|
||||
|
||||
interface KotlinInterfaceIndirectInheritance : KotlinInterfaceForIndirect {
|
||||
|
||||
override fun test() {}
|
||||
|
||||
override fun testForNonDefault() {}
|
||||
|
||||
override fun testAbstract() {}
|
||||
}
|
||||
|
||||
open class KotlinClass : JavaInterface {
|
||||
override fun test() {}
|
||||
|
||||
override fun testForNonDefault() {}
|
||||
|
||||
override fun testAbstract() {}
|
||||
}
|
||||
|
||||
interface KotlinInterfaceX {
|
||||
|
||||
fun test() {}
|
||||
|
||||
fun testForNonDefault() {}
|
||||
|
||||
fun testAbstract() {}
|
||||
}
|
||||
|
||||
interface KotlinInterfaceManySuper: JavaInterface, KotlinInterfaceX {
|
||||
override fun test() {}
|
||||
|
||||
override fun testForNonDefault() {}
|
||||
|
||||
override fun testAbstract() {}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// !JVM_TARGET: 1.8
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
// !JVM_TARGET: 1.8
|
||||
|
||||
interface A {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun test() {
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ class Bar2 : Foo(), A
|
||||
class Bar3 : Foo(), B
|
||||
|
||||
open class BarWithJvmDefault : B {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
override fun test() {
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -2,12 +2,12 @@
|
||||
// !JVM_TARGET: 1.8
|
||||
|
||||
public interface KInterface {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun test(): String {
|
||||
return "OK";
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
val property: String
|
||||
get() = "OK"
|
||||
|
||||
@@ -23,7 +23,7 @@ public interface KInterface {
|
||||
// FILE: 1.kt
|
||||
|
||||
interface KotlinInterface : KInterface {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun fooo() {
|
||||
super.test()
|
||||
super.property
|
||||
@@ -42,7 +42,7 @@ interface KotlinInterface : KInterface {
|
||||
}
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
val propertyy: String
|
||||
get() {
|
||||
super.test()
|
||||
@@ -105,7 +105,7 @@ interface KotlinInterface : KInterface {
|
||||
}
|
||||
|
||||
interface KotlinInterfaceIndirectInheritance : KotlinInterface {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun foooo() {
|
||||
super.test()
|
||||
super.property
|
||||
@@ -124,7 +124,7 @@ interface KotlinInterfaceIndirectInheritance : KotlinInterface {
|
||||
}
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
val propertyyy: String
|
||||
get() {
|
||||
super.test()
|
||||
|
||||
Vendored
-162
@@ -1,162 +0,0 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_TARGET: 1.8
|
||||
// FILE: JavaInterface.java
|
||||
|
||||
public interface JavaInterface {
|
||||
default String test() {
|
||||
return "OK";
|
||||
}
|
||||
|
||||
default String testOverride() {
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
|
||||
interface KotlinInterface : JavaInterface {
|
||||
@JvmDefault
|
||||
fun fooo() {
|
||||
super.test()
|
||||
|
||||
object {
|
||||
fun run () {
|
||||
super@KotlinInterface.test()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
val propertyy: String
|
||||
get() {
|
||||
super.test()
|
||||
|
||||
object {
|
||||
fun run () {
|
||||
super@KotlinInterface.test()
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
override fun testOverride(): String {
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
|
||||
interface KotlinInterfaceIndirectInheritance : KotlinInterface {
|
||||
@JvmDefault
|
||||
fun foooo() {
|
||||
super.test()
|
||||
|
||||
object {
|
||||
fun run () {
|
||||
super@KotlinInterfaceIndirectInheritance.test()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JvmDefault
|
||||
val propertyyy: String
|
||||
get() {
|
||||
super.test()
|
||||
|
||||
object {
|
||||
fun run () {
|
||||
super@KotlinInterfaceIndirectInheritance.test()
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
open class KotlinClass : JavaInterface {
|
||||
fun foo() {
|
||||
super.test()
|
||||
super.testOverride()
|
||||
|
||||
object {
|
||||
fun run () {
|
||||
super@KotlinClass.test()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val property: String
|
||||
get() {
|
||||
super.test()
|
||||
super.testOverride()
|
||||
|
||||
object {
|
||||
fun run () {
|
||||
super@KotlinClass.test()
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
class KotlinClassIndirectInheritance : KotlinClass() {
|
||||
fun foo2() {
|
||||
super.test()
|
||||
super.testOverride()
|
||||
|
||||
object {
|
||||
fun run () {
|
||||
super@KotlinClassIndirectInheritance.test()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val property2: String
|
||||
get() {
|
||||
super.test()
|
||||
super.testOverride()
|
||||
|
||||
object {
|
||||
fun run () {
|
||||
super@KotlinClassIndirectInheritance.test()
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
class KotlinClassIndirectInheritance2 : KotlinInterfaceIndirectInheritance {
|
||||
fun foo() {
|
||||
super.test()
|
||||
super.testOverride()
|
||||
|
||||
object {
|
||||
fun run () {
|
||||
super@KotlinClassIndirectInheritance2.test()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val property: String
|
||||
get() {
|
||||
super.test()
|
||||
super.testOverride()
|
||||
|
||||
object {
|
||||
fun run () {
|
||||
super@KotlinClassIndirectInheritance2.test()
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
KotlinClass().foo()
|
||||
KotlinClass().property
|
||||
KotlinClassIndirectInheritance2().foo()
|
||||
KotlinClassIndirectInheritance2().property
|
||||
|
||||
KotlinClass().test()
|
||||
KotlinClass().property
|
||||
KotlinClass().testOverride()
|
||||
KotlinClassIndirectInheritance().testOverride()
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
// !JVM_TARGET: 1.8
|
||||
// FILE: JavaInterface.java
|
||||
|
||||
Vendored
+7
-7
@@ -2,27 +2,27 @@
|
||||
|
||||
interface B {
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun test() {}
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
abstract fun test2(s: String = "")
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
abstract fun test3()
|
||||
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
abstract val prop: String
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
abstract val prop2: String
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
val prop3: String
|
||||
get() = ""
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
var prop4: String
|
||||
get() = ""
|
||||
set(value) {}
|
||||
|
||||
+5
-5
@@ -2,21 +2,21 @@
|
||||
|
||||
abstract class A {
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun test() {}
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
abstract fun test2(s: String = "")
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
abstract fun test3()
|
||||
}
|
||||
|
||||
object B {
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun test() {}
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun test2(s: String = "") {}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
interface B {
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
val prop1: String
|
||||
<!WRONG_ANNOTATION_TARGET!>@JvmDefault<!> get() = ""
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
|
||||
interface A {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun test() {}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
|
||||
interface A {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
val test: String
|
||||
get() = "OK"
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// !JVM_TARGET: 1.8
|
||||
// FILE: 1.kt
|
||||
interface A {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun test() {
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ interface B : A {
|
||||
}
|
||||
|
||||
interface C : B {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
override fun test() {
|
||||
super.test()
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -1,6 +1,6 @@
|
||||
// !JVM_TARGET: 1.8
|
||||
interface A {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun test() {
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ interface B{
|
||||
|
||||
|
||||
interface C : A, B {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
override fun test() {
|
||||
super<B>.test()
|
||||
super<A>.test()
|
||||
@@ -24,7 +24,7 @@ interface C : A, B {
|
||||
}
|
||||
|
||||
interface D : B, A {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
override fun test() {
|
||||
super<B>.test()
|
||||
super<A>.test()
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
// !JVM_TARGET: 1.8
|
||||
interface A {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun test()
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
// !JVM_TARGET: 1.8
|
||||
interface A {
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun test() {
|
||||
|
||||
}
|
||||
|
||||
+7
-7
@@ -2,27 +2,27 @@
|
||||
|
||||
interface B {
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
fun test() {}
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
abstract fun test2(s: String = "")
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
abstract fun test3()
|
||||
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
abstract val prop: String
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
abstract val prop2: String
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
val prop3: String
|
||||
get() = ""
|
||||
|
||||
@JvmDefault
|
||||
@<!DEPRECATION!>JvmDefault<!>
|
||||
var prop4: String
|
||||
get() = ""
|
||||
set(value) {}
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
// !JVM_TARGET: 1.8
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
|
||||
interface B {
|
||||
|
||||
@JvmDefault
|
||||
fun test() {}
|
||||
|
||||
@JvmDefault
|
||||
abstract fun test2(s: String = "")
|
||||
|
||||
@JvmDefault
|
||||
abstract fun test3()
|
||||
|
||||
|
||||
@JvmDefault
|
||||
abstract val prop: String
|
||||
|
||||
@JvmDefault
|
||||
abstract val prop2: String
|
||||
|
||||
@JvmDefault
|
||||
val prop3: String
|
||||
get() = ""
|
||||
|
||||
@JvmDefault
|
||||
var prop4: String
|
||||
get() = ""
|
||||
set(value) {}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !JVM_TARGET: 1.8
|
||||
// !JVM_DEFAULT_MODE: enable
|
||||
|
||||
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
import java.io.InputStream
|
||||
|
||||
fun InputStream.test() {
|
||||
readBytes()
|
||||
|
||||
readBytes(1)
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
import java.io.InputStream
|
||||
|
||||
fun InputStream.test() {
|
||||
|
||||
Vendored
+15
-15
@@ -42,38 +42,38 @@ private val unaryOperations: HashMap<UnaryOperationKey<*>, Pair<Function1<Any?,
|
||||
unaryOperation(BYTE, "toInt", { a -> a.toInt() }, emptyUnaryFun),
|
||||
unaryOperation(BYTE, "minus", { a -> a.unaryMinus() }, { a -> a.unaryMinus() }),
|
||||
unaryOperation(BYTE, "minus", { a -> a.unaryMinus() }, { a -> a.unaryMinus() }),
|
||||
unaryOperation(BYTE, "toChar", { a -> a.toChar() }, emptyUnaryFun),
|
||||
unaryOperation(BYTE, "toChar", { a -> a.<!DEPRECATION!>toChar<!>() }, emptyUnaryFun),
|
||||
unaryOperation(BYTE, "toLong", { a -> a.toLong() }, emptyUnaryFun),
|
||||
unaryOperation(BYTE, "plus", { a -> a.unaryPlus() }, emptyUnaryFun),
|
||||
unaryOperation(BYTE, "toFloat", { a -> a.toFloat() }, emptyUnaryFun),
|
||||
unaryOperation(BYTE, "toDouble", { a -> a.toDouble() }, emptyUnaryFun),
|
||||
unaryOperation(BYTE, "toShort", { a -> a.toShort() }, emptyUnaryFun),
|
||||
unaryOperation(BYTE, "toByte", { a -> a.toByte() }, emptyUnaryFun),
|
||||
unaryOperation(CHAR, "toInt", { a -> a.toInt() }, emptyUnaryFun),
|
||||
unaryOperation(CHAR, "toInt", { a -> a.<!DEPRECATION!>toInt<!>() }, emptyUnaryFun),
|
||||
unaryOperation(CHAR, "toChar", { a -> a.toChar() }, emptyUnaryFun),
|
||||
unaryOperation(CHAR, "toLong", { a -> a.toLong() }, emptyUnaryFun),
|
||||
unaryOperation(CHAR, "toFloat", { a -> a.toFloat() }, emptyUnaryFun),
|
||||
unaryOperation(CHAR, "toDouble", { a -> a.toDouble() }, emptyUnaryFun),
|
||||
unaryOperation(CHAR, "toShort", { a -> a.toShort() }, emptyUnaryFun),
|
||||
unaryOperation(CHAR, "toByte", { a -> a.toByte() }, emptyUnaryFun),
|
||||
unaryOperation(CHAR, "toLong", { a -> a.<!DEPRECATION!>toLong<!>() }, emptyUnaryFun),
|
||||
unaryOperation(CHAR, "toFloat", { a -> a.<!DEPRECATION!>toFloat<!>() }, emptyUnaryFun),
|
||||
unaryOperation(CHAR, "toDouble", { a -> a.<!DEPRECATION!>toDouble<!>() }, emptyUnaryFun),
|
||||
unaryOperation(CHAR, "toShort", { a -> a.<!DEPRECATION!>toShort<!>() }, emptyUnaryFun),
|
||||
unaryOperation(CHAR, "toByte", { a -> a.<!DEPRECATION!>toByte<!>() }, emptyUnaryFun),
|
||||
unaryOperation(DOUBLE, "toInt", { a -> a.toInt() }, emptyUnaryFun),
|
||||
unaryOperation(DOUBLE, "minus", { a -> a.unaryMinus() }, emptyUnaryFun),
|
||||
unaryOperation(DOUBLE, "toChar", { a -> a.toChar() }, emptyUnaryFun),
|
||||
unaryOperation(DOUBLE, "toChar", { a -> a.<!DEPRECATION!>toChar<!>() }, emptyUnaryFun),
|
||||
unaryOperation(DOUBLE, "toLong", { a -> a.toLong() }, emptyUnaryFun),
|
||||
unaryOperation(DOUBLE, "plus", { a -> a.unaryPlus() }, emptyUnaryFun),
|
||||
unaryOperation(DOUBLE, "toFloat", { a -> a.toFloat() }, emptyUnaryFun),
|
||||
unaryOperation(DOUBLE, "toDouble", { a -> a.toDouble() }, emptyUnaryFun),
|
||||
unaryOperation(DOUBLE, "toShort", { a -> a.toShort() }, emptyUnaryFun),
|
||||
unaryOperation(DOUBLE, "toByte", { a -> a.toByte() }, emptyUnaryFun),
|
||||
unaryOperation(DOUBLE, "toShort", { a -> a.<!DEPRECATION_ERROR!>toShort<!>() }, emptyUnaryFun),
|
||||
unaryOperation(DOUBLE, "toByte", { a -> a.<!DEPRECATION_ERROR!>toByte<!>() }, emptyUnaryFun),
|
||||
unaryOperation(FLOAT, "toInt", { a -> a.toInt() }, emptyUnaryFun),
|
||||
unaryOperation(FLOAT, "minus", { a -> a.unaryMinus() }, emptyUnaryFun),
|
||||
unaryOperation(FLOAT, "toChar", { a -> a.toChar() }, emptyUnaryFun),
|
||||
unaryOperation(FLOAT, "toChar", { a -> a.<!DEPRECATION!>toChar<!>() }, emptyUnaryFun),
|
||||
unaryOperation(FLOAT, "toLong", { a -> a.toLong() }, emptyUnaryFun),
|
||||
unaryOperation(FLOAT, "plus", { a -> a.unaryPlus() }, emptyUnaryFun),
|
||||
unaryOperation(FLOAT, "toFloat", { a -> a.toFloat() }, emptyUnaryFun),
|
||||
unaryOperation(FLOAT, "toDouble", { a -> a.toDouble() }, emptyUnaryFun),
|
||||
unaryOperation(FLOAT, "toShort", { a -> a.toShort() }, emptyUnaryFun),
|
||||
unaryOperation(FLOAT, "toByte", { a -> a.toByte() }, emptyUnaryFun),
|
||||
unaryOperation(FLOAT, "toShort", { a -> a.<!DEPRECATION_ERROR!>toShort<!>() }, emptyUnaryFun),
|
||||
unaryOperation(FLOAT, "toByte", { a -> a.<!DEPRECATION_ERROR!>toByte<!>() }, emptyUnaryFun),
|
||||
unaryOperation(INT, "plus", { a -> a.unaryPlus() }, emptyUnaryFun),
|
||||
unaryOperation(INT, "toShort", { a -> a.toShort() }, emptyUnaryFun),
|
||||
unaryOperation(INT, "toByte", { a -> a.toByte() }, emptyUnaryFun),
|
||||
@@ -90,13 +90,13 @@ private val unaryOperations: HashMap<UnaryOperationKey<*>, Pair<Function1<Any?,
|
||||
unaryOperation(LONG, "inv", { a -> a.inv() }, emptyUnaryFun),
|
||||
unaryOperation(LONG, "toInt", { a -> a.toInt() }, emptyUnaryFun),
|
||||
unaryOperation(LONG, "minus", { a -> a.unaryMinus() }, { a -> a.unaryMinus() }),
|
||||
unaryOperation(LONG, "toChar", { a -> a.toChar() }, emptyUnaryFun),
|
||||
unaryOperation(LONG, "toChar", { a -> a.<!DEPRECATION!>toChar<!>() }, emptyUnaryFun),
|
||||
unaryOperation(LONG, "toLong", { a -> a.toLong() }, emptyUnaryFun),
|
||||
unaryOperation(LONG, "toDouble", { a -> a.toDouble() }, emptyUnaryFun),
|
||||
unaryOperation(LONG, "toFloat", { a -> a.toFloat() }, emptyUnaryFun),
|
||||
unaryOperation(SHORT, "toInt", { a -> a.toInt() }, emptyUnaryFun),
|
||||
unaryOperation(SHORT, "minus", { a -> a.unaryMinus() }, { a -> a.unaryMinus() }),
|
||||
unaryOperation(SHORT, "toChar", { a -> a.toChar() }, emptyUnaryFun),
|
||||
unaryOperation(SHORT, "toChar", { a -> a.<!DEPRECATION!>toChar<!>() }, emptyUnaryFun),
|
||||
unaryOperation(SHORT, "toLong", { a -> a.toLong() }, emptyUnaryFun),
|
||||
unaryOperation(SHORT, "plus", { a -> a.unaryPlus() }, emptyUnaryFun),
|
||||
unaryOperation(SHORT, "toFloat", { a -> a.toFloat() }, emptyUnaryFun),
|
||||
|
||||
+2
-2
@@ -7,14 +7,14 @@ abstract class A : MutableList<String> {
|
||||
}
|
||||
|
||||
fun foo(x: MutableList<String>, y: java.util.ArrayList<String>, z: A, p: java.util.Comparator<in String>) {
|
||||
x.sort(p)
|
||||
x.<!DEPRECATION_ERROR!>sort<!>(p)
|
||||
y.sort(p)
|
||||
|
||||
z.sort(p)
|
||||
}
|
||||
|
||||
fun bar(x: MutableList<String>, y: java.util.ArrayList<String>, z: A) {
|
||||
x.sort { a, b -> a.length - b.length }
|
||||
x.<!DEPRECATION_ERROR!>sort<!> { a, b -> a.length - b.length }
|
||||
y.sort { a, b -> a.length - b.length }
|
||||
|
||||
z.sort { a, b -> a.length - b.length }
|
||||
|
||||
Reference in New Issue
Block a user