Fix UnusedSymbolInspection for parameterless and suspend main functions

#KT-26574 Fixed
This commit is contained in:
Denis Zharkov
2018-09-07 12:11:00 +03:00
parent 1cc0c12f87
commit aa74511378
8 changed files with 40 additions and 1 deletions
@@ -0,0 +1,11 @@
<problems>
<problem>
<file>topLevelBothMains.kt</file>
<line>3</line>
<module>light_idea_test_case</module>
<package>&lt;default&gt;</package>
<entry_point TYPE="file" FQNAME="temp:///src/topLevelBothMains.kt" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused symbol</problem_class>
<description>Function &quot;main&quot; is never used</description>
</problem>
</problems>
@@ -0,0 +1,2 @@
// LANGUAGE_VERSION: 1.3
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection
@@ -0,0 +1,4 @@
package a
fun main() {}
fun main(args: Array<String>) {}
@@ -0,0 +1,3 @@
fun main() {
}
@@ -0,0 +1,3 @@
suspend fun main(args: Array<String>) {
}