Keep empty bodies for declarations with comments (KT-16078)
#KT-16078 Fixed
This commit is contained in:
+1
-2
@@ -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() {}
|
||||
|
||||
@@ -28,8 +28,7 @@ fun f6() = 1
|
||||
fun f7() = 8
|
||||
|
||||
// Two lines between
|
||||
fun l1() {
|
||||
}
|
||||
fun l1() {}
|
||||
|
||||
|
||||
fun l2() {}
|
||||
|
||||
@@ -34,3 +34,15 @@ enum class E1 {
|
||||
fun e = fun(a: Int,
|
||||
b: String) {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
fun commented1() {}
|
||||
|
||||
/*
|
||||
*/
|
||||
fun commented2() {}
|
||||
|
||||
// Comment
|
||||
fun commented3() {}
|
||||
+12
@@ -28,3 +28,15 @@ enum class E1 {
|
||||
|
||||
fun e = fun(a: Int,
|
||||
b: String) {}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
fun commented1() {}
|
||||
|
||||
/*
|
||||
*/
|
||||
fun commented2() {}
|
||||
|
||||
// Comment
|
||||
fun commented3() {}
|
||||
@@ -21,3 +21,20 @@ class EmptyProperties {
|
||||
}
|
||||
set(value) {}
|
||||
}
|
||||
|
||||
class EmptyProperties {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
var newline: String
|
||||
/**
|
||||
*
|
||||
*/
|
||||
get() {
|
||||
return ""
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
set(value) {}
|
||||
}
|
||||
+16
@@ -25,3 +25,19 @@ class EmptyProperties {
|
||||
get() { return "" }
|
||||
set(value) {}
|
||||
}
|
||||
|
||||
class EmptyProperties {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
var newline: String
|
||||
/**
|
||||
*
|
||||
*/
|
||||
get() { return "" }
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
set(value) {}
|
||||
}
|
||||
+1
-2
@@ -14,8 +14,7 @@ fun fooFun2() {
|
||||
}
|
||||
|
||||
//-----------------------
|
||||
public fun Int.extFun1() {
|
||||
}
|
||||
public fun Int.extFun1() {}
|
||||
|
||||
public
|
||||
fun Int.extFun2() {
|
||||
|
||||
Reference in New Issue
Block a user