Kotlin: Add test case for confusingly overloaded $default method

This commit is contained in:
Tamas Vajk
2022-10-31 10:00:52 +01:00
parent 79aba19dde
commit 556c199a89
2 changed files with 6 additions and 0 deletions

View File

@@ -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 |

View File

@@ -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) {}
}