1324.2.
(a) Testimony of a victim or witness in a felony prosecution for a violation or attempted violation of Section 220, 243.4, 261, 261.5, 286, 287, 288, or 289, that states that the victim or witness, at or around the time of the violation or attempted violation, unlawfully possessed or used a controlled substance or alcohol is inadmissible in a separate prosecution of that victim or witness to prove illegal possession or use of that controlled substance or alcohol.(b) Evidence that the testifying witness unlawfully possessed or used a controlled substance or alcohol is not excluded in the felony prosecution of a violation or attempted violation of Section 220, 243.4, 261, 261.5, 286, 287, 288, or 289.
(c) Evidence that a witness received use immunity for testimony pursuant to subdivision (a) is not excluded in the felony prosecution of a violation or attempted violation of Section 220, 243.4, 261, 261.5, 286, 287, 288, or 289.