New J2K: make initial generating code formatting better
This commit is contained in:
@@ -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
@@ -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,5 +1,4 @@
|
||||
internal open class Base
|
||||
|
||||
internal class X : Base(), Cloneable {
|
||||
override fun hashCode(): Int {
|
||||
return super.hashCode()
|
||||
|
||||
Reference in New Issue
Block a user