Converter:
Omit Unit return type Refactor handling of Unit type: extract separate object UnitType
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
package test
|
||||
public open class Test(str : String) {
|
||||
var myStr : String = "String2"
|
||||
public open fun sout(str : String) : Unit {
|
||||
public open fun sout(str : String) {
|
||||
System.out.println(str)
|
||||
}
|
||||
public open fun dummy(str : String) : String {
|
||||
return str
|
||||
}
|
||||
public open fun test() : Unit {
|
||||
public open fun test() {
|
||||
sout("String")
|
||||
val test = "String2"
|
||||
sout(test)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package test
|
||||
public open class Test(str : String) {
|
||||
var myStr : String = "String2"
|
||||
public open fun sout(str : String) : Unit {
|
||||
public open fun sout(str : String) {
|
||||
System.out?.println(str)
|
||||
}
|
||||
public open fun dummy(str : String) : String {
|
||||
return str
|
||||
}
|
||||
public open fun test() : Unit {
|
||||
public open fun test() {
|
||||
sout("String")
|
||||
var test : String = "String2"
|
||||
sout(test)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
open class Foo() {
|
||||
open fun execute() : Unit {
|
||||
open fun execute() {
|
||||
}
|
||||
}
|
||||
open class Bar() {
|
||||
@@ -8,7 +8,7 @@ var fooNotNull : Foo = Foo()
|
||||
var fooNullable : Foo = null
|
||||
}
|
||||
open class Test() {
|
||||
public open fun test(barNotNull : Bar, barNullable : Bar) : Unit {
|
||||
public open fun test(barNotNull : Bar, barNullable : Bar) {
|
||||
barNotNull.fooNotNull.execute()
|
||||
barNotNull.fooNullable.execute()
|
||||
barNullable.fooNotNull.execute()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
open class Foo() {
|
||||
open fun execute() : Unit {
|
||||
open fun execute() {
|
||||
}
|
||||
}
|
||||
open class Bar() {
|
||||
@@ -8,7 +8,7 @@ var fooNotNull : Foo = Foo()
|
||||
var fooNullable : Foo? = null
|
||||
}
|
||||
open class Test() {
|
||||
public open fun test(barNotNull : Bar, barNullable : Bar?) : Unit {
|
||||
public open fun test(barNotNull : Bar, barNullable : Bar?) {
|
||||
barNotNull.fooNotNull.execute()
|
||||
barNotNull.fooNullable?.execute()
|
||||
barNullable?.fooNotNull?.execute()
|
||||
|
||||
Reference in New Issue
Block a user