Skip to content

Commit ec5ac17

Browse files
committed
Kotlin: Excluded compiler generated methods from java/confusing-method-signature
1 parent 556c199 commit ec5ac17

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

java/ql/src/Violations of Best Practice/Naming Conventions/ConfusingOverloading.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ private predicate delegate(Method caller, Method callee) {
137137

138138
from Method m, Method n, string messageQualifier
139139
where
140+
// Exclude compiler generated methods, such as Kotlin `$default` methods:
141+
not m.isCompilerGenerated() and
140142
confusinglyOverloaded(m, n) and
141143
(
142144
if m.getDeclaringType() = n.getDeclaringType()
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
| Test.kt:12:5:12:45 | fn$default | Method A.fn$default(..) could be confused with overloaded method $@, since dispatch depends on static types. | Test.kt:13:5:13:40 | fn$default | fn$default |

0 commit comments

Comments
 (0)