Support checkcast instruction for array
This commit is contained in:
@@ -38,7 +38,7 @@ class JDIEval(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun isInstanceOf(value: Value, targetType: Type): Boolean {
|
override fun isInstanceOf(value: Value, targetType: Type): Boolean {
|
||||||
assert(targetType.getSort() == Type.OBJECT, "Can't check isInstanceOf() for non-object type $targetType")
|
assert(targetType.getSort() == Type.OBJECT || targetType.getSort() == Type.ARRAY, "Can't check isInstanceOf() for non-object type $targetType")
|
||||||
|
|
||||||
val _class = loadClass(targetType)
|
val _class = loadClass(targetType)
|
||||||
return invokeMethod(
|
return invokeMethod(
|
||||||
|
|||||||
@@ -459,4 +459,8 @@ class TestData {
|
|||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void castToArray() {
|
||||||
|
int[] i = (int[]) null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user