Remove runtime usage from unused receiver parameter tests
This commit is contained in:
+3
-5
@@ -1,16 +1,12 @@
|
|||||||
// WITH_RUNTIME
|
|
||||||
|
|
||||||
class Test(val str: String) {
|
class Test(val str: String) {
|
||||||
|
|
||||||
private fun <caret>Test.print() {
|
private fun <caret>Test.print() {
|
||||||
println(str)
|
println(str)
|
||||||
println(this.str)
|
println(this.str)
|
||||||
println(this@print.str)
|
println(this@print.str)
|
||||||
println()
|
println(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun test(test: Test) {
|
fun test(test: Test) {
|
||||||
print()
|
|
||||||
test.print()
|
test.print()
|
||||||
Test("three").print()
|
Test("three").print()
|
||||||
}
|
}
|
||||||
@@ -19,3 +15,5 @@ class Test(val str: String) {
|
|||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
Test("one").test(Test("two"))
|
Test("one").test(Test("two"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun println(a: Any) {}
|
||||||
|
|||||||
+3
-5
@@ -1,16 +1,12 @@
|
|||||||
// WITH_RUNTIME
|
|
||||||
|
|
||||||
class Test(val str: String) {
|
class Test(val str: String) {
|
||||||
|
|
||||||
private fun <caret>print() {
|
private fun <caret>print() {
|
||||||
println(str)
|
println(str)
|
||||||
println(this.str)
|
println(this.str)
|
||||||
println(this.str)
|
println(this.str)
|
||||||
println()
|
println(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun test(test: Test) {
|
fun test(test: Test) {
|
||||||
print()
|
|
||||||
test.print()
|
test.print()
|
||||||
Test("three").print()
|
Test("three").print()
|
||||||
}
|
}
|
||||||
@@ -19,3 +15,5 @@ class Test(val str: String) {
|
|||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
Test("one").test(Test("two"))
|
Test("one").test(Test("two"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun println(a: Any) {}
|
||||||
|
|||||||
+2
-16
@@ -1,23 +1,9 @@
|
|||||||
// PROBLEM: none
|
// PROBLEM: none
|
||||||
// WITH_RUNTIME
|
|
||||||
|
|
||||||
class Test(val str: String) {
|
class Test(val str: String) {
|
||||||
|
|
||||||
private fun <caret>Test.print() {
|
private fun <caret>Test.print() {
|
||||||
println(str)
|
println(this@Test.str) // Unused receiver isn't reported because of explicit usage for parent `this`
|
||||||
println(this.str)
|
|
||||||
println(this@print.str)
|
|
||||||
println(this@Test.str)
|
|
||||||
println()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun test(test: Test) {
|
|
||||||
print()
|
|
||||||
test.print()
|
|
||||||
Test("three").print()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun println(a: Any) {}
|
||||||
Test("one").test(Test("two"))
|
|
||||||
}
|
|
||||||
+4
-3
@@ -1,7 +1,4 @@
|
|||||||
// WITH_RUNTIME
|
|
||||||
|
|
||||||
class Test(private val foo: Int) {
|
class Test(private val foo: Int) {
|
||||||
|
|
||||||
val <caret>Test.baz: Int
|
val <caret>Test.baz: Int
|
||||||
get() = foo + this.foo + this@baz.foo
|
get() = foo + this.foo + this@baz.foo
|
||||||
|
|
||||||
@@ -15,3 +12,7 @@ class Test(private val foo: Int) {
|
|||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
Test(1).test(Test(2))
|
Test(1).test(Test(2))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun println(a: Any) {
|
||||||
|
// kotlin.io.println(a)
|
||||||
|
}
|
||||||
|
|||||||
+4
-3
@@ -1,7 +1,4 @@
|
|||||||
// WITH_RUNTIME
|
|
||||||
|
|
||||||
class Test(private val foo: Int) {
|
class Test(private val foo: Int) {
|
||||||
|
|
||||||
val <caret>baz: Int
|
val <caret>baz: Int
|
||||||
get() = foo + this.foo + this.foo
|
get() = foo + this.foo + this.foo
|
||||||
|
|
||||||
@@ -15,3 +12,7 @@ class Test(private val foo: Int) {
|
|||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
Test(1).test(Test(2))
|
Test(1).test(Test(2))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun println(a: Any) {
|
||||||
|
// kotlin.io.println(a)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user