Make semicolon in loop with empty body not redundant

So #KT-12805 Fixed
This commit is contained in:
Dmitry Neverov
2017-05-14 20:44:26 +03:00
committed by Mikhail Glukhikh
parent e30b9758f4
commit bf4e69e17f
3 changed files with 22 additions and 3 deletions
+7
View File
@@ -29,4 +29,11 @@ fun ((Int) -> Unit).doIt() {
fun bar() {
a(); // redundant
b()
}
fun baz(args: Array<String>) {
for (arg in args);
while (args.size > 0);
// But here redundant!
do while (args.size > 0);
}
@@ -70,4 +70,12 @@
<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>38</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>