JDIEval: coerce byte to int correctly

This commit is contained in:
Natalia Ukhorskaya
2015-09-07 14:20:26 +03:00
parent 519c2784ff
commit cee3cf53d9
2 changed files with 6 additions and 0 deletions
@@ -182,6 +182,7 @@ public fun interpreterLoop(
Type.BYTE -> byte(value.int.toByte())
Type.SHORT -> short(value.int.toShort())
Type.CHAR -> char(value.int.toChar())
Type.INT -> int(value.int)
else -> throw UnsupportedByteCodeException("Should not be coerced: $expectedType")
}
return ValueReturned(coerced)
@@ -779,6 +779,11 @@ class TestData extends BaseTestData {
return true;
}
static int coerceByte() {
byte[] b = new byte[2];
return b[1];
}
public TestData() {
}
}