Allow KtEnumEntry...RefExpression.referencedElement be nullable

This commit fixes KNPE provoked by RemoveExplicitTypeArgumentsIntention
#KT-29735 Fixed
This commit is contained in:
Mikhail Glukhikh
2020-12-17 13:04:12 +03:00
parent 4f96f9d6a1
commit d907c48d9c
5 changed files with 30 additions and 5 deletions
@@ -223,4 +223,14 @@
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unnecessary type argument</problem_class>
<description>Remove explicit type arguments</description>
</problem>
<problem>
<file>kt29735.kt</file>
<line>4</line>
<module>light_idea_test_case</module>
<package>kt29735</package>
<entry_point TYPE="file" FQNAME="kt29735.kt" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unnecessary type argument</problem_class>
<description>Remove explicit type arguments</description>
</problem>
</problems>
@@ -0,0 +1,5 @@
// WITH_RUNTIME
enum class A(val strings: List<String>) {
B(listOf<Str<caret>ing>(""))
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
enum class A(val strings: List<String>) {
B(listOf(""))
}