Converter:

Omit Unit return type
Refactor handling of Unit type: extract separate object UnitType
This commit is contained in:
Pavel V. Talanov
2013-11-19 13:50:03 +04:00
parent 82b19499e3
commit 21bc2887d2
186 changed files with 253 additions and 245 deletions
@@ -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()