JDIEval: coerce byte to int correctly
This commit is contained in:
@@ -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() {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user