Skip to content

Commit 556c199

Browse files
committed
Kotlin: Add test case for confusingly overloaded $default method
1 parent 79aba19 commit 556c199

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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 |

java/ql/test/kotlin/query-tests/ConfusingMethodSignature/Test.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ class C {
77
prop(this)
88
}
99
}
10+
11+
class A {
12+
fun <T : Any> fn(value: T, i: Int = 1) {}
13+
fun fn(value: String, i: Int = 1) {}
14+
}

0 commit comments

Comments
 (0)