mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Merge pull request #11045 from tamasvajk/kotlin-confusing-default
Kotlin: Excluded compiler generated methods from `java/confusing-method-signature`
This commit is contained in:
@@ -57,6 +57,8 @@ private predicate candidateMethod(RefType t, Method m, string name, int numParam
|
||||
m.getNumberOfParameters() = numParam and
|
||||
m = m.getSourceDeclaration() and
|
||||
not m.getAnAnnotation() instanceof DeprecatedAnnotation and
|
||||
// Exclude compiler generated methods, such as Kotlin `$default` methods:
|
||||
not m.isCompilerGenerated() and
|
||||
not whitelist(name)
|
||||
}
|
||||
|
||||
|
||||
@@ -7,3 +7,8 @@ class C {
|
||||
prop(this)
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
fun <T : Any> fn(value: T, i: Int = 1) {}
|
||||
fun fn(value: String, i: Int = 1) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user