Inspection to warn on using == with array types #KT-13384 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
7d35316d95
commit
1bbde54e9d
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection detects '==' operator for arrays that should be replaced with 'Arrays.equals'
|
||||
</body>
|
||||
</html>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
fun foo() {
|
||||
val a = arrayOf("a", "b", "c")
|
||||
val b = arrayOf("a", "b", "c")
|
||||
if (<spot>Arrays.equals(a, b)</spot>) {
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
fun foo() {
|
||||
val a = arrayOf("a", "b", "c")
|
||||
val b = arrayOf("a", "b", "c")
|
||||
if (<spot>a == b</spot>) {
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention replace '==' operator for arrays with 'Arrays.equals'
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user