Add "Redundant empty initializer block" inspection

^KT-5008 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-04-25 08:43:48 +03:00
committed by Natalia Selezneva
parent c155bf680f
commit b650c7ab00
11 changed files with 122 additions and 0 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.inspections.RedundantEmptyInitializerBlockInspection
@@ -0,0 +1,5 @@
class Test {
<caret>init {
}
}
@@ -0,0 +1,2 @@
class Test {
}
@@ -0,0 +1,9 @@
class Test {
// init comment1
<caret>init {
// init comment2
}
fun foo() {
}
}
@@ -0,0 +1,5 @@
class Test {
fun foo() {
}
}
@@ -0,0 +1,9 @@
// PROBLEM: none
class Test {
<caret>init {
foo()
}
fun foo() {
}
}