diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/evaluate/ConstantExpressionEvaluator.kt b/compiler/frontend/src/org/jetbrains/jet/lang/evaluate/ConstantExpressionEvaluator.kt index 261705e0ee9..9b4bb19f6b4 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/evaluate/ConstantExpressionEvaluator.kt +++ b/compiler/frontend/src/org/jetbrains/jet/lang/evaluate/ConstantExpressionEvaluator.kt @@ -554,7 +554,7 @@ private fun createStringConstant(value: CompileTimeConstant<*>?): StringValue? { is CharValue, is DoubleValue, is FloatValue, is BooleanValue, - is NullValue -> StringValue(value.getValue().toString(), value.canBeUsedInAnnotations(), value.usesVariableAsConstant()) + is NullValue -> StringValue("${value.getValue()}", value.canBeUsedInAnnotations(), value.usesVariableAsConstant()) else -> null } } diff --git a/compiler/tests/org/jetbrains/jet/evaluate/AbstractEvaluateExpressionTest.kt b/compiler/tests/org/jetbrains/jet/evaluate/AbstractEvaluateExpressionTest.kt index 77bca56722d..a7eaac8c61f 100644 --- a/compiler/tests/org/jetbrains/jet/evaluate/AbstractEvaluateExpressionTest.kt +++ b/compiler/tests/org/jetbrains/jet/evaluate/AbstractEvaluateExpressionTest.kt @@ -43,7 +43,7 @@ public abstract class AbstractEvaluateExpressionTest : AbstractAnnotationDescrip if (compileTimeConstant is StringValue) { "\\\"${compileTimeConstant.getValue()}\\\"" } else { - compileTimeConstant.toString() + "$compileTimeConstant" } } }