Prohibit non-const expressions through varargs in annotations

Fixes #KT-23153 for Kotlin 1.3

 The problem was in the type check of expression type against expected type. When feature `AssigningArraysToVarargsInNamedFormInAnnotations` (KT-20171) appeared, expected type could be wrong, which led to failed type check
This commit is contained in:
Mikhail Zarechenskiy
2018-03-12 02:10:25 +03:00
parent 4ebd11a7ae
commit 6086cd2cf4
12 changed files with 209 additions and 60 deletions
@@ -67,6 +67,7 @@ enum class LanguageFeature(
JvmStaticInInterface(KOTLIN_1_3),
InlineClasses(KOTLIN_1_3),
ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion(KOTLIN_1_3),
ProhibitNonConstValuesAsVarargsInAnnotations(KOTLIN_1_3),
StrictJavaNullabilityAssertions(sinceVersion = null, defaultState = State.DISABLED),
ProperIeee754Comparisons(sinceVersion = null, defaultState = State.DISABLED),