New J2K: make initial generating code formatting better

This commit is contained in:
Ilya Kirillov
2019-09-26 17:28:16 +03:00
parent f3b53a9532
commit c000f33955
192 changed files with 396 additions and 625 deletions
@@ -8,9 +8,7 @@ internal class Test {
return x.toDouble()
}
fun nya(): Double {
//TODO explicitlly call apply here
fun nya(): Double { //TODO explicitlly call apply here
return foo(1, FunctionalI<Int, Double> { x: Int -> this.toDouble(x) })
}
}
@@ -23,7 +23,6 @@ internal class Test {
internal class Java8Class {
private val field = Java8Class()
fun testStaticFunction() {
val staticFunFromSameClass: Function0<*> = { staticFun() }
staticFunFromSameClass.invoke()
@@ -40,7 +39,6 @@ internal class Java8Class {
val obj = Java8Class()
val memberFunFromSameClass: Function0<*> = { obj.memberFun() }
memberFunFromSameClass.invoke()
val anotherObj = Test()
val memFunFromAnotherClass: Function0<*> = { anotherObj.memberFun() }
memFunFromAnotherClass.invoke()
@@ -71,7 +69,6 @@ internal class Java8Class {
fun testOverloads() {
val constructorWithoutParams = { Test.testOverloads() }
constructorWithoutParams.invoke()
val constructorWithParam = { i: Int -> Test.testOverloads(i) }
constructorWithParam.invoke(2) + 42
}
@@ -87,7 +84,6 @@ internal class Java8Class {
}
companion object {
fun staticFun(): Int {
return 1
}
@@ -1,6 +1,5 @@
internal class C {
fun foo1(p1: Int, p2: Int) {}
fun foo2(
p1: Int,
p2: Int) {
+1 -4
View File
@@ -1,7 +1,4 @@
class Foo {
private external fun nativeMethod()
var bar: Int
external get
external set
var bar: Int external get external set
}
-1
View File
@@ -1,5 +1,4 @@
internal open class Base
internal class X : Base(), Cloneable {
override fun hashCode(): Int {
return super.hashCode()