Detect redundant 'is' check
#KT-14187 Fixed
This commit is contained in:
committed by
Mikhail Zarechenskiy
parent
768e0fa738
commit
cd24adac32
+2
-2
@@ -5,6 +5,6 @@ inline public fun reg(converter: (Any) -> Any, flag: Boolean) {
|
||||
}
|
||||
|
||||
public inline fun register(converter: (Any) -> Any) {
|
||||
<!USAGE_IS_NOT_INLINABLE!>converter<!> is (Any) -> Any
|
||||
reg(converter, <!USAGE_IS_NOT_INLINABLE!>converter<!> is (Any) -> Any)
|
||||
<!USELESS_IS_CHECK!><!USAGE_IS_NOT_INLINABLE!>converter<!> is (Any) -> Any<!>
|
||||
reg(converter, <!USELESS_IS_CHECK!><!USAGE_IS_NOT_INLINABLE!>converter<!> is (Any) -> Any<!>)
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,7 @@ inline public fun reg(converter: (Any) -> Any) {
|
||||
|
||||
public inline fun register(converter: (Any) -> Any) {
|
||||
reg(when(<!USAGE_IS_NOT_INLINABLE!>converter<!>) {
|
||||
is (Any) -> Any -> <!USAGE_IS_NOT_INLINABLE!>converter<!>
|
||||
<!USELESS_IS_CHECK!>is (Any) -> Any<!> -> <!USAGE_IS_NOT_INLINABLE!>converter<!>
|
||||
else -> <!USAGE_IS_NOT_INLINABLE!>converter<!>
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user