In parentage proceedings concerning a child for whom parentage is sought, a parent or alleged parent shall not be prosecuted for any criminal act about which (1) the parent or alleged parent testifies in connection with such proceedings, or (2) the parent or alleged parent makes any statement prior to such proceedings with respect to the issue of parentage.