Introduce "Unused result of data class copy" inspection

#KT-34121 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-12-11 12:00:55 +09:00
committed by klunnii
parent ae6d89b100
commit bc580d2fd9
10 changed files with 126 additions and 1 deletions
@@ -0,0 +1,11 @@
// FIX: none
// WITH_RUNTIME
fun main() {
val o = Foo("")
o.<caret>copy(prop = "New")
bar(o)
}
data class Foo(val prop: String)
fun bar(foo: Foo) {}