if (primExpr.getLeft() != null)
{
// Get value of left expression
if (primExpr.getLeft() instanceof CastExpression)
{
CastExpression castExpr = (CastExpression)primExpr.getLeft();
Expression castLeftExpr = castExpr.getLeft();
if (castLeftExpr instanceof PrimaryExpression)
{
value = getValueForPrimaryExpression((PrimaryExpression)castLeftExpr);
String castClassName = castExpr.getClassName();
if (value != null)
{
// TODO Do this in the compilation stage, and check for ClassNotResolvedException
Class castClass = imports.resolveClassDeclaration(castClassName, clr, null);
if (!castClass.isAssignableFrom(value.getClass()))