Introduct "Redundant 'with' call" inspection #KT-6633 Fixed

This commit is contained in:
Toshiaki Kameyama
2018-07-12 17:19:48 +09:00
committed by Natalia Selezneva
parent 58becffb1f
commit 4c34ced1fa
40 changed files with 493 additions and 0 deletions
@@ -0,0 +1,12 @@
// PROBLEM: none
// WITH_RUNTIME
fun test() {
val c = MyClass()
<caret>with(c) {
println(f())
}
}
class MyClass {
val f: () -> String = { "" }
}