J2K: preserving line breaks between parameters

This commit is contained in:
Valentin Kipyatkov
2015-06-16 13:42:15 +03:00
parent 1e988028a9
commit fefb828fae
10 changed files with 108 additions and 5 deletions
@@ -0,0 +1,23 @@
class C1 {
C1(int arg1,
int arg2,
int arg3) {
}
C1(int x,
int y) {
this(x, x + y, 0);
}
}
class C2 {
private int arg1;
private int arg2;
C2(int arg1,
int arg2,
int arg3) {
this.arg1 = arg1;
this.arg2 = arg2;
}
}
@@ -0,0 +1,12 @@
class C1(arg1: Int,
arg2: Int,
arg3: Int) {
constructor(x: Int,
y: Int) : this(x, x + y, 0) {
}
}
class C2(private val arg1: Int,
private val arg2: Int,
arg3: Int)
@@ -0,0 +1,19 @@
class C {
public void foo1(int p1, int p2) {
}
public void foo2(
int p1,
int p2) {
}
public void foo3(int p1,
int p2) {
}
public void foo4(
int p1, int p2,
int p3, int p4
) {
}
}
@@ -0,0 +1,18 @@
class C {
public fun foo1(p1: Int, p2: Int) {
}
public fun foo2(
p1: Int,
p2: Int) {
}
public fun foo3(p1: Int,
p2: Int) {
}
public fun foo4(
p1: Int, p2: Int,
p3: Int, p4: Int) {
}
}
@@ -2,7 +2,10 @@
import java.util.*
class A<T> {
fun foo(nonMutableCollection: Collection<String>, mutableCollection: MutableCollection<String>, mutableSet: MutableSet<T>, mutableMap: MutableMap<String, T>) {
fun foo(nonMutableCollection: Collection<String>,
mutableCollection: MutableCollection<String>,
mutableSet: MutableSet<T>,
mutableMap: MutableMap<String, T>) {
mutableCollection.addAll(nonMutableCollection)
mutableSet.add(mutableMap.remove("a"))
}