fa517180b7
Support FirStringConcatenationCall in FirCompileTimeConstantEvaluator.
This allows string templates ("foo${bar}") to be evaluated as constants,
assuming the interpolated expressions are themselves constant.
In addition, fixes some handling bugs with KtConstantEvaluationMode,
where some expressions that are not valid in a `const val` declaration
were being supported for `CONSTANT_EXPRESSION_EVALUATION`, including
non-static final Java fields in FIR, and composite expressions of
non-const properties in FE1.0.
5 lines
175 B
Kotlin
Vendored
5 lines
175 B
Kotlin
Vendored
const val QUESTION = "the ultimate question of life, the universe, and everything"
|
|
const val ANSWER = 42
|
|
|
|
val MESSAGE = <expr>"The answer to ${QUESTION} is ${ANSWER}."</expr>
|