Files
kotlin-fork/idea/testData/inspections/cleanup/cleanup.kt.after
T

60 lines
865 B
Plaintext
Vendored

import pack.bar
import pack.oldFun2 // should not be removed for non-deprecated overload used
class A private constructor()
fun foo() {
loop@
for (i in 1..100) {
val v = bar(i + 2)
/* comment */
continue@loop
}
bar(bar(10 + 2) + 1)
oldFun2()
ff()
val xx = valX
varX = 50
varY = 60
1 === 2
}
fun unnecessarySafeCall(x: String) {
x.length()
}
fun unnecessaryExclExcl(x: String) {
x.length()
}
fun unnecessaryCast(x: String) = x
fun unnecessaryElvis(x: String) = x
@JavaAnn(1, arg1 = "abc") class MyClass
const val i = 1
annotation class Fancy(val param: Int)
@Fancy(<caret>i) class D
class Foo {
var x: Int = 0
get = field
set(value) { field = value }
}
class B {
operator fun plus(a: A): A = A()
}
fun foo() {
B() + B()
B() + B()
B() + B()
}