private boolean canTriviallyCastJsoSemantics(JReferenceType type, JReferenceType qType) {
type = type.getUnderlyingType();
qType = qType.getUnderlyingType();
if (type instanceof JArrayType && qType instanceof JArrayType) {
JArrayType aType = (JArrayType) type;
JArrayType aqType = (JArrayType) qType;
return program.typeOracle.canTriviallyCast(type, qType)
|| (program.isJavaScriptObject(aType.getLeafType()) && program
.isJavaScriptObject(aqType.getLeafType()));
}
return program.typeOracle.canTriviallyCast(type, qType)
|| (program.isJavaScriptObject(type) && program.isJavaScriptObject(qType));
}