mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Kotlin: Consider ::class type check in equals
This commit is contained in:
@@ -30,6 +30,8 @@ predicate hasTypeTest(Variable v) {
|
||||
or
|
||||
any(SafeCastExpr sce).getExpr() = v.getAnAccess()
|
||||
or
|
||||
any(ClassExpr c).getExpr() = v.getAnAccess()
|
||||
or
|
||||
exists(MethodAccess ma |
|
||||
ma.getMethod().getName() = "getClass" and
|
||||
ma.getQualifier() = v.getAnAccess()
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
| Test.kt:10:14:12:5 | equals | This 'equals()' method does not check argument type. |
|
||||
|
||||
Reference in New Issue
Block a user