"Unused receiver parameter" inspection: Fix false negative in same class (KT-23897)
#KT-23897 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
793d34b913
commit
e7a9614fb5
+21
@@ -0,0 +1,21 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Test(val str: String) {
|
||||
|
||||
private fun <caret>Test.print() {
|
||||
println(str)
|
||||
println(this.str)
|
||||
println(this@print.str)
|
||||
println()
|
||||
}
|
||||
|
||||
fun test(test: Test) {
|
||||
print()
|
||||
test.print()
|
||||
Test("three").print()
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
Test("one").test(Test("two"))
|
||||
}
|
||||
Reference in New Issue
Block a user