IDEA-127533 int field is displayed as char - show \n etc as chars

This commit is contained in:
Unknown
2017-10-14 22:37:03 +02:00
parent e6b0c48866
commit 7dc01f9a55

View File

@@ -394,7 +394,8 @@ public class ConstExprent extends Exprent {
// BYTECHAR and SHORTCHAR => CHAR in the CHAR context
if (expectedType.equals(VarType.VARTYPE_CHAR) &&
(constType.equals(VarType.VARTYPE_BYTECHAR) || constType.equals(VarType.VARTYPE_SHORTCHAR))) {
if (isPrintableAscii(getIntValue())) {
int intValue = getIntValue();
if (isPrintableAscii(intValue) || CHAR_ESCAPES.containsKey(intValue)) {
setConstType(VarType.VARTYPE_CHAR);
}
}