Unused Symbol: Check descriptor before creating light class to prevent InvalidMirrorException on red code

This commit is contained in:
Alexey Sedunov
2015-10-07 15:06:32 +03:00
parent 730cc7b551
commit e8e0f2d7e1
6 changed files with 31 additions and 8 deletions
@@ -0,0 +1,6 @@
// Closing brace is intentionally missed
val id = array("kotlin.FlexibleType"
private class Some() {
override fun foo() = 1
}
@@ -47,4 +47,12 @@
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused Symbol</problem_class>
<description>Class 'B' is never used</description>
</problem>
<problem>
<file>BadCodeNoExceptions.kt</file>
<line>2</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/badCodeNoExceptions.kt" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused Symbol</problem_class>
<description>Property 'id' is never used</description>
</problem>
</problems>