Section 23. At the trial of a criminal case in the superior court, upon indictment, or in a district court, the fact that the defendant did not testify at any preliminary hearing in the first court, or that at such hearing he waived examination or did not offer any evidence in his own defense, shall not be used as evidence against him, nor be referred to or commented upon by the prosecuting officer.