@Override protected void writePostOrPrefixMethod( int op, String method, Expression expression, Expression orig) { ClassNode type = getController().getTypeChooser().resolveType(orig, getController().getClassNode()); int operationType = getOperandType(type); BinaryExpressionWriter bew = binExpWriter[operationType]; if (bew.writePostOrPrefixMethod(op, true)) { OperandStack operandStack = getController().getOperandStack(); // at this point the receiver will be already on the stack operandStack.doGroovyCast(type); bew.writePostOrPrefixMethod(op, false); operandStack.replace(bew.getNormalOpResultType()); } else { super.writePostOrPrefixMethod(op, method, expression, orig); } }