Don't report as redundant 1st semicolon in enum without entries

So #KT-12524 Fixed
This commit is contained in:
Dmitry Neverov
2017-06-23 06:50:52 +03:00
committed by Mikhail Glukhikh
parent 3a606d13f0
commit 3e29f9ed5a
3 changed files with 58 additions and 0 deletions
+11
View File
@@ -36,4 +36,15 @@ fun baz(args: Array<String>) {
while (args.size > 0);
// But here redundant!
do while (args.size > 0);
}
enum class Foo {
; //not redundant
;
companion object;
;
}
enum class Bar {
; //redundant
}
@@ -78,4 +78,40 @@
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant semicolon</problem_class>
<description>Redundant semicolon</description>
</problem>
<problem>
<file>Test.kt</file>
<line>43</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/Test.kt" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant semicolon</problem_class>
<description>Redundant semicolon</description>
</problem>
<problem>
<file>Test.kt</file>
<line>44</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/Test.kt" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant semicolon</problem_class>
<description>Redundant semicolon</description>
</problem>
<problem>
<file>Test.kt</file>
<line>45</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/Test.kt" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant semicolon</problem_class>
<description>Redundant semicolon</description>
</problem>
<problem>
<file>Test.kt</file>
<line>49</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/Test.kt" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant semicolon</problem_class>
<description>Redundant semicolon</description>
</problem>
</problems>