mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
Merge pull request #9150 from tamasvajk/kotlin-MissingInstanceofInEquals
Kotlin: Add more type check casts to MissingInstanceofInEquals query
This commit is contained in:
@@ -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