New J2K: do not print modifiers which are going to be removed in postprocessing

This commit is contained in:
Ilya Kirillov
2019-06-26 17:45:49 +03:00
parent 0b7b16162d
commit 3e04bfb156
34 changed files with 233 additions and 198 deletions
+4 -4
View File
@@ -13,9 +13,9 @@ internal class A {
fun /* we return int*/ foo( /*int*/ p: Int/* parameter p */): Int { /* body is empty */
}
private/*it's private*/ val field = 0
/*it's public*/ fun foo(s: String?): Char {}
protected/*it's protected*/ fun foo(c: Char) {}
private/*it's private*/ val field = 0
/*it's public*/ fun foo(s: String?): Char {}
protected/*it's protected*/ fun foo(c: Char) {}
/**
* Method description.
* Multi-line method description.
@@ -29,6 +29,6 @@ internal class A {
fun foo(param1: String?, param2: String?, param3: String?) {}
companion object {
/*it's public*/const /*and static*/ val/*and final*/ C = 1
/*it's public*/ /*and static*/ const val/*and final*/ C = 1
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
internal class A(// comment for field2 setter
// comment for field2 getter
// comment for field2
var field2: Int) {
var field2 // comment for field2
: Int) {
/**
* Comment for field1 setter
*/
+1 -1
View File
@@ -3,5 +3,5 @@ internal open class A {
}
internal class B : A() {
override fun a() {}
public override fun a() {}
}
+1 -1
View File
@@ -3,7 +3,7 @@ internal open class A {
}
internal open class B : A() {
override fun foo() {}
public override fun foo() {}
}
internal class C : B() {
+2 -3
View File
@@ -31,9 +31,8 @@ internal abstract class E {
}
internal class F : E() {
override fun f1() {}
override fun f2() {
public override fun f1() {}
public override fun f2() {
super.f2()
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ internal open class Base {
}
internal class Child : Base() {
override fun test() {}
public override fun test() {}
override fun toString(): String {
return "Child"
}
+1 -2
View File
@@ -5,8 +5,7 @@ internal open class B(i: Int) {
}
internal class A : B(10) {
override fun call(): Int {
public override fun call(): Int {
return super.call()
}
}