
15 Cal.App.4th 567 (1993)
18 Cal. Rptr.2d 785
THE PEOPLE, Plaintiff and Respondent,
v.
SEAN MICHAEL HOLLINS, Defendant and Appellant.
Docket No. H009851.
Court of Appeals of California, Sixth District.
April 30, 1993.
*568 COUNSEL
Donald Thomas Bergerson, under appointment by the Court of Appeal, for Defendant and Appellant.
*569 Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, Ronald A. Bass, Assistant Attorney General, Stan M. Helfman and Laurence K. Sullivan, Deputy Attorneys General, for Plaintiff and Respondent.
[Opinion certified for partial publication.[*]]
OPINION
PREMO, Acting P.J.
After denial of his motion to compel disclosure of a confidential surveillance location, appellant Sean Michael Hollins pled no contest to one count of sale of cocaine. (Health & Saf. Code, § 11352.) Having obtained a certificate of probable cause, he appeals the adverse ruling, contending that the court erred in upholding the officer's claim of privilege and in failing to strike his testimony or grant other relief.

FACTS
On October 12, 1991, San Jose Police Sergeant Scott Cornfield observed intermittent contact between appellant, who was pacing back and forth in front of a liquor store, and Richard Chavez, who was riding a bicycle around a nearby parking lot. On one occasion, appellant handed Chavez a "small pebble-like object." Five minutes later, Chavez directed a car to pull up in front of the liquor store, and Chavez gave something to the driver and received a single piece of currency. Chavez got back on his bicycle, approached appellant, and gave him cash. Appellant handed Chavez another pebble-like object and then entered the liquor store.
When appellant left the store, he was arrested. Chavez observed this, swallowed something he was holding in his hand, and rode quickly away.
Appellant's pockets were searched. He possessed one rock of base cocaine and less than an ounce of marijuana. Chavez was arrested later, and possessed neither money nor cocaine.
Cornfield testified at appellant's preliminary hearing, but refused to identify the location from which he made the observations except to say that it was "within 100 feet of the liquor store." He claimed "the privilege under 1040-1042 of the Evidence Code in that to be more specific would clearly hinder any further investigations that would be done in this area." Appellant objected, but the magistrate sustained this claim of privilege.
*570 Defense counsel brought a "motion to suppress evidence" in the superior court seeking disclosure of the surveillance location.[1] Appellant pointed out that Cornfield's testimony was the sole evidence that he had not purchased for personal use the single rock with which he was found at the time of arrest. Appellant also questioned the accuracy of Cornfield's testimony because he claimed to have made his observations without the aid of binoculars.
The trial court ordered an in camera hearing on the issue. When it denied the motion, it declared itself satisfied that the officer was justified in claiming a privilege against disclosure due to ongoing surveillance from the site. The court also found that the officer had adequate opportunity to observe and concluded that appellant had not suffered interference with his right to confront and cross-examine witnesses.
After ruling, the court stated that defense counsel would be permitted to cross-examine Cornfield at trial with regard to all aspects of his opportunity to observe except for his exact location, and the court agreed to issue a certificate of probable cause for appeal. (Pen. Code, § 1237.5.)[2] Appellant entered a nolo contendere plea, and received a three-year mitigated term in state prison concurrent with his sentence in an unrelated robbery. This appeal ensued.

CONTENTIONS ON APPEAL
Appellant claims that the court erred in upholding Cornfield's assertion of privilege pursuant to Evidence Code section 1040 because there was no showing that Cornfield's discovery of a desirable surveillance site amounted to information acquired by him "in confidence." He also complains that the need to preserve secrecy to protect subsequent investigations is not a sufficient justification for a claim of privilege. Finally, even if Cornfield properly claimed a privilege, the court erred in refusing to provide appellant with a meaningful remedy, such as striking Cornfield's testimony. Appellant contends he is entitled to reversal on appeal even if the error is not otherwise appealable.

DISCUSSION

1., 2.[*]
.... .... .... .... .... .... .... .


*571 3. Availability of Writ Review

(1) After the change of plea, in clearing up "some confusion in the record," the trial court also informed appellant that "the 995 motion ... [was] subject to a writ."
This too was error. The purpose of the writ procedure is to provide a forum for a speedy pretrial challenge of irregularities so that "the matter can be expeditiously returned to the magistrate for proceedings free of the charged defects." (People v. Pompa-Ortiz (1980) 27 Cal.3d 519, 529 [165 Cal. Rptr. 851, 612 P.2d 941].) Section 999a requires a dissatisfied defendant to file a petition for a writ of prohibition within 15 days of the denial of the motion.[5]
Just as a guilty or nolo contendere plea waives appellate review of "irregularities in the preliminary examination procedures which are not jurisdictional in the fundamental sense" (People v. Pompa-Ortiz, supra, 27 Cal.3d at p. 529), so does a guilty or nolo contendere plea render unavailable the section 999a writ procedure. Once a defendant admits guilt, there is no reason to litigate "irregularities which could be cured, or which would not preclude subsequent proceedings to establish guilt." (People v. Turner (1985) 171 Cal. App.3d 116, 126 [214 Cal. Rptr. 572].)
In this case, denial of appellant's motion followed by an immediate change of plea rendered review of the issue by way of a writ petition as unavailable to him as review on appeal.

4. Appealability as Inducement for Plea

(2) Appellant moves to firmer ground with his claim that his nolo contendere plea was induced by the promise that the issue was preserved for appeal. This is disputed by the Attorney General, who asserts that "it is not obvious at all that appeal on the merits of the in limine ruling formed any part of this bargain." (Italics original.)
The first mention of plea negotiations appears in the record immediately after the court clarified the effect of its ruling on the cross-examination of Cornfield. Defense counsel stated: "And as we discussed in chambers, ... it seems to me a ruling has been made now on the 995 motion or 1538.5 *572 motion, whatever it is, anyway, the claim of privilege by the officer, the court has sustained the claim of privilege. And to the extent we have a right of appeal, and to the extent it would be necessary to get a certificate of probable cause or whatever is indicated, it is my understanding that the court is willing to preserve that right of appeal for us.
"THE COURT: Absolutely. [¶] [] It is my understanding that the district attorney also understands that and anticipates that there might very well be such an appeal; is that correct?
"[DISTRICT ATTORNEY]: That is what defense counsel has represented to the court.
"THE COURT: Well, I went a little bit further. In the event there was anything required to assist him to perfect that right of appeal, such as 
"[DEFENSE COUNSEL]: There used to be a certificate of probable cause, and it seems to me that I read somewhere recently, maybe that was reinstated in situations where a plea was entered, or something of that sort. To the extent that was required I just wanted to get an indication from the court that they would be willing to cooperate in securing whatever was necessary to perfect an appeal. I'm not sure that that is necessary, but to the extent it is I want it protected.
"THE COURT: And that is our understanding. [¶] [] And so between now and the time that [defendant] [h]as to go to jury trial, it is my understanding that there has been some discussion with the defendant, and the district attorney has made an offer, counsel has indicated that possibly the defendant wants to accept that offer."
Defense counsel stated the plea bargain, and the court began the preplea voir dire. After asking appellant if he understood the effect of a nolo contendere plea, the court continued, "you understand that you are preserving your right to an appeal under the 995 motion, but that that may or may not avail you of anything, you understand that? [¶] A: Yes, ma'am, I do." The court finished the advisement of and waiver of rights, and appellant entered a plea of "no contest."
Sentencing was continued until the next morning. At that hearing, the court stated: "Before I actually arraign Mr. Hollins for purpose of sentence, I want to make it clear on the record, I think we may have some confusion in the record on the right of appeal. Obviously Mr. Hollins can appeal the judgment in this case, but the 995 motion I think is not subject to appeal, *573 although it is subject to a writ. And so there may be no confusion about that, if any document or certificate is required, [defense counsel] will provide you with that. [¶] [] A certificate of probable cause or anything else that would facilitate a writ. But I do not believe that there is a right of appeal on that kind of a motion."
After the court imposed sentence and advised appellant of his right to appeal the judgment in whole or in part, the court added: "[a]nd in this case we have already discussed that the 995 motion probably has to be attacked by a writ."
Because of these comments, the Attorney General asserts, "the court's flat statement at sentencing that the ruling was not appealable," cannot be reconciled with "appellant's claim on appeal that the trial court purportedly promised him the ruling was appealable." Respondent also finds significance in the fact that defense counsel, hearing from the court that denial of the "995 motion probably has to be attacked by a writ," did not immediately move to withdraw the plea.
First, the trial court's postplea attempt to clarify the "confusion" was not a "flat statement" that appellant had not preserved any sort of appellate review. The clear import of both the pre- and postplea statements was that review by a higher court (whatever the procedural vehicle) remained available despite the change of plea. While the statement might alert counsel of the necessity of following one procedure rather than another, as our Supreme Court stated in a case where a defendant who pled guilty requested (and received) relief from failure to comply with section 1237.5, "[i]t is readily apparent that where a defendant has been convicted upon a plea of guilty, his right to appeal may be dependent on many technical requirements of which he may be unaware." (People v. Ribero (1971) 4 Cal.3d 55, 64 [92 Cal. Rptr. 692, 480 P.2d 308].) From our record, it is clear that difficulties with the "many technical requirements" permeated the proceedings.
As a result, the trial court's postplea advisement that denial of the 995 motion "is subject to a writ" and its assurance of "a certificate of probable cause or anything else that would facilitate a writ," intimated that the change of nomenclature had no practical effect on appellant's ability to submit his dispute to a higher court. Consequently, appellant would have no reason to believe that a motion to withdraw his plea was warranted. Both advisements  preplea and postplea  erroneously led appellant to believe that appellate review was preserved.
Appellant observes that the trial court's "comment that the proper vehicle for post-conviction challenge might be a writ,  came at sentencing and not *574 at the time of the plea; the remark is therefore irrelevant to construing the terms of the plea bargain." (Italics original.) Nevertheless, we refer to it because if, when the court mentioned the writ procedure, appellant had been advised that before a change of plea a defendant "already had the right of limited review under section 999a and that by pleading guilty he was abandoning any chance for a trial and appeal on all grounds" (People v. Brown (1971) 18 Cal. App.3d 1052, 1055 [96 Cal. Rptr. 476]), from the emphasis appellant and the court placed on preservation of appeal rights, and from the points appellant raised in his briefs, "it appears doubtful that ... he would have changed his plea." (Ibid.)
"Where a defendant's plea is `induced by misrepresentations of a fundamental nature' such as a bargain which is beyond the power of the trial court, a judgment based upon the plea must be reversed. [Citations.]" (People v. Coleman (1977) 72 Cal. App.3d 287, 292 [139 Cal. Rptr. 908].)
The situation in Coleman is almost identical to appellant's. In that case, codefendant Duke agreed to plead guilty to an included offense in a bargain which "included the preservation of Dukes' right `to appeal the denial of the request for the informant.' The trial judge responded: `[t]he record can indicate the representations you are making. As far as the legal effect of it, that will be up to the Court of Appeal. An appeal from a guilty plea requires a certificate.... And if you file the appropriate document the Court will consider that certificate.' Defense counsel answered: `Fine, Your Honor.'
"The trial court issued its certificate purporting to permit an appeal from the judgment, raising the issue of the propriety of the trial court action denying Dukes' motion for disclosure of the identity of the informer." (People v. Coleman, supra, 72 Cal. App.3d at p. 292.)
The appellate court stated: "Dukes' plea of guilty was induced by a material mistake in which the trial court participated so that the judgment based upon the plea must be reversed and the matter remanded to the trial court with instructions to permit Dukes to withdraw the plea." (People v. Coleman, supra, 72 Cal. App.3d at p. 293.)
In the instant case, relying on People v. DeVaughn (1977) 18 Cal.3d 889, 896 [135 Cal. Rptr. 786, 558 P.2d 872], appellant also desires to "avail himself of the right to move to withdraw his plea as improperly induced by the nugatory promise of a right to appeal." This contention is well taken.
"Appellant's guilty plea precludes him from seeking review of the denial of his motion pursuant to Penal Code section 995, notwithstanding the trial *575 court's promise to the contrary. [Citations.]" (People v. Truman (1992) 6 Cal. App.4th 1816, 1820-1821 [9 Cal. Rptr.2d 138].) "The promise was illusory and therefore was an improper inducement which voids the plea. [Citation.] We recognize [defendant] should be given an opportunity to reevaluate his guilty plea and withdraw that plea and proceed to trial if he so desires. [Citations.]" (People v. Bonwit (1985) 173 Cal. App.3d 828, 833 [219 Cal. Rptr. 297].)

DISPOSITION
The matter is remanded to the superior court to allow appellant the opportunity to withdraw his plea. Should he fail to do so within 45 days of the filing of the remittitur, the judgment is affirmed.
Elia, J., and Mihara, J., concurred.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for publication with the exception of parts 1 and 2.
[1]  The trial court and counsel agreed to pursue the matter as a motion to set aside the information pursuant to Penal Code section 995.
[2]  Further statutory references are to the Penal Code unless otherwise stated.
[*]   See footnote, ante, page 567.
[5]  Section 999a provides in pertinent part: "A petition for a writ of prohibition, predicated upon the ground that ... the defendant had been committed on an information without reasonable or probable cause, or that the court abused its discretion in utilizing the procedure set out in subdivision (b) of Section 995a, must be filed in the appellate court within 15 days after a motion made under Section 995 ... has been denied by the trial court...."
