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:
@@ -1,19 +1,17 @@
|
||||
package test
|
||||
|
||||
public class Short {
|
||||
public class Short(s: String) {
|
||||
companion object {
|
||||
public fun valueOf(value: String): Short {
|
||||
return Short()
|
||||
return Short(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Test {
|
||||
companion object {
|
||||
public fun test() {
|
||||
test.Short.valueOf("1")
|
||||
test.Short.valueOf("1")
|
||||
java.lang.Short.valueOf("1")
|
||||
}
|
||||
object Test {
|
||||
public fun test() {
|
||||
test.Short.valueOf("1")
|
||||
test.Short.valueOf("1")
|
||||
java.lang.Short.valueOf("1")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user