mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Kotlin: Add more type check tests for MissingInstanceofInEquals query
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
| Test.kt:0:0:0:0 | equals | equals() method does not seem to check argument type. |
|
||||
| Test.kt:4:14:6:5 | equals | equals() method does not seem to check argument type. |
|
||||
@@ -0,0 +1 @@
|
||||
Likely Bugs/Comparison/MissingInstanceofInEquals.ql
|
||||
@@ -0,0 +1,7 @@
|
||||
data class D(val x: Int) {}
|
||||
|
||||
data class E(val x: Int) {
|
||||
override fun equals(other: Any?): Boolean {
|
||||
return (other as? E)?.x == this.x
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user