KT-5287 J2K: Convert class with private constructor and static functions to "object" instead of class with "class object"

#KT-5287 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-03-27 13:55:47 +03:00
parent 6dbb13c32d
commit f19eb20803
63 changed files with 550 additions and 482 deletions
@@ -1,11 +1,9 @@
import java.lang.reflect.Constructor
class X {
companion object {
throws(javaClass<Exception>())
fun <T> foo(constructor: Constructor<T>, args1: Array<Any>, args2: Array<Any>) {
constructor.newInstance(*args1)
constructor.newInstance(args1, args2)
}
object X {
throws(javaClass<Exception>())
fun <T> foo(constructor: Constructor<T>, args1: Array<Any>, args2: Array<Any>) {
constructor.newInstance(*args1)
constructor.newInstance(args1, args2)
}
}