Unused symbol: add test to fix behaviour #KT-16318 Obsolete

This commit is contained in:
Mikhail Glukhikh
2017-09-08 19:03:41 +03:00
committed by Mikhail Glukhikh
parent 37d2386a0b
commit ae509d5980
2 changed files with 13 additions and 0 deletions
@@ -0,0 +1,7 @@
// PROBLEM: none
class My(val x: Int = IMPORTANT_CONST) {
companion object {
val <caret>IMPORTANT_CONST = 42
}
}
@@ -1850,6 +1850,12 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/unusedSymbol"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("asDefaultConstructorParameter.kt")
public void testAsDefaultConstructorParameter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedSymbol/asDefaultConstructorParameter.kt");
doTest(fileName);
}
@TestMetadata("companionViaImport.kt")
public void testCompanionViaImport() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedSymbol/companionViaImport.kt");