[AA-FIR] Add support for constant evaluation of string templates.

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.
This commit is contained in:
Justin Paupore
2023-02-13 20:16:15 -08:00
committed by Ilya Kirillov
parent 0193c83b05
commit fa517180b7
12 changed files with 100 additions and 23 deletions
@@ -1,8 +1,8 @@
expression: Build.VERSION_CODES().CUPCAKE
CONSTANT_EXPRESSION_EVALUATION
constant: 3
constantValueKind: Int
constant: NOT_EVALUATED
constantValueKind: NOT_EVALUATED
CONSTANT_LIKE_EXPRESSION_EVALUATION
constantLike: 3