create StringValue only for primitive compile time values

This commit is contained in:
Natalia Ukhorskaya
2013-11-22 16:07:21 +04:00
parent 9593edc6e7
commit e6923ba29e
5 changed files with 142 additions and 3 deletions
@@ -340,7 +340,11 @@ private fun createStringConstant(value: CompileTimeConstant<*>?): StringValue? {
return when (value) {
null -> null
is StringValue -> value
else -> StringValue(value.getValue().toString())
is IntValue, is ByteValue, is ShortValue, is LongValue,
is CharValue,
is DoubleValue, is FloatValue,
is BooleanValue -> StringValue(value.getValue().toString())
else -> null
}
}