Keep empty bodies for declarations with comments (KT-16078)

#KT-16078 Fixed
This commit is contained in:
Nikolay Krasko
2017-02-16 17:59:36 +03:00
parent e16b0524b6
commit d58707972d
13 changed files with 75 additions and 20 deletions
+1 -2
View File
@@ -1,8 +1,7 @@
/** Doc comment for A */
class A {
/** Doc comment for function */
fun foo() {
}
fun foo() {}
/**
* Doc comment for property
@@ -1,6 +1,5 @@
// No lines
fun f1() {
}
fun f1() {}
val p1 = 1
fun f2() {}
+1 -2
View File
@@ -28,8 +28,7 @@ fun f6() = 1
fun f7() = 8
// Two lines between
fun l1() {
}
fun l1() {}
fun l2() {}
+12
View File
@@ -34,3 +34,15 @@ enum class E1 {
fun e = fun(a: Int,
b: String) {
}
/**
*
*/
fun commented1() {}
/*
*/
fun commented2() {}
// Comment
fun commented3() {}
+12
View File
@@ -28,3 +28,15 @@ enum class E1 {
fun e = fun(a: Int,
b: String) {}
/**
*
*/
fun commented1() {}
/*
*/
fun commented2() {}
// Comment
fun commented3() {}
+17
View File
@@ -21,3 +21,20 @@ class EmptyProperties {
}
set(value) {}
}
class EmptyProperties {
/**
*
*/
var newline: String
/**
*
*/
get() {
return ""
}
/**
*
*/
set(value) {}
}
+16
View File
@@ -25,3 +25,19 @@ class EmptyProperties {
get() { return "" }
set(value) {}
}
class EmptyProperties {
/**
*
*/
var newline: String
/**
*
*/
get() { return "" }
/**
*
*/
set(value) {}
}
+1 -2
View File
@@ -14,8 +14,7 @@ fun fooFun2() {
}
//-----------------------
public fun Int.extFun1() {
}
public fun Int.extFun1() {}
public
fun Int.extFun2() {