Do not report 'const' inapplicability on property of error type

#KT-12477 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-02-07 20:59:58 +03:00
parent e7ea076093
commit d84c303029
4 changed files with 37 additions and 16 deletions
@@ -10,3 +10,8 @@ enum class MyEnum { A }
<!TYPE_CANT_BE_USED_FOR_CONST_VAL!>const<!> val enumConst: MyEnum = MyEnum.A
<!TYPE_CANT_BE_USED_FOR_CONST_VAL!>const<!> val arrayConst: Array<String> = arrayOf("1")
<!TYPE_CANT_BE_USED_FOR_CONST_VAL!>const<!> val intArrayConst: IntArray = intArrayOf()
const val unresolvedConst1 = <!UNRESOLVED_REFERENCE!>Unresolved<!>
<!WRONG_MODIFIER_TARGET!>const<!> var unresolvedConst2 = <!UNRESOLVED_REFERENCE!>Unresolved<!>
const val unresolvedConst3 = <!UNRESOLVED_REFERENCE, PROPERTY_INITIALIZER_NO_BACKING_FIELD!>Unresolved<!>
<!CONST_VAL_WITH_GETTER!>get() = 10<!>
@@ -7,6 +7,9 @@ public const val intArrayConst: kotlin.IntArray
public const val intConst: kotlin.Int = 1
public const val longConst: kotlin.Long = 1.toLong()
public const val stringConst: kotlin.String = "empty"
public const val unresolvedConst1: [ERROR : Type for Unresolved]
public const var unresolvedConst2: [ERROR : Type for Unresolved]
public const val unresolvedConst3: [ERROR : Type for Unresolved]
public final enum class MyEnum : kotlin.Enum<MyEnum> {
enum entry A