This is an action of tort to recover compensation for personal injuries alleged to have been sustained by the plaintiff as a result of the negligent failure of the defendant to maintain in a reasonably safe condition a freight elevator appurtenant to the premises of the defendant. The defendant pleaded general denial, contributory negligence, and res judicata.
The case came on to be heard before a judge of the Superior Court sitting without a jury. Upon motion of the defendant the case was heard upon the affirmative defence of res judicata. The defendant offered in evidence the record and pleadings of another action in the Superior Court. The plaintiff made offers of proof hereinafter referred to. They were excluded and the plaintiff excepted. The judge made a finding for the defendant, ruling that the defence of res judicata was made out. The plaintiff excepted. The judge then reported the case to this court “as to the correctness of . . . [his] rulings.”
It was agreed that the parties to the two cases were the same. And it appears from a comparison of the declarations in the two cases — and the plaintiff makes no contention to the contrary — that both cases were brought for the same cause of action. Obviously the plaintiff, in the two cases, was seeking a remedy for the same wrong. The defendant in the earlier case filed a demurrer to the declaration — which was in two counts — on the grounds “ (a) That said declaration does not state with substantial certainty the substantive facts necessary to maintain the cause of action, (b) That the matters contained in said counts are insufficient in law to enable the defendant [sic] to maintain an action of tort.” On this demurrer the indorsement was made: “Demurrer sustained with leave to plaintiff to amend within ten days.”
Nearly two years and a half thereafter the plaintiff filed a motion for leave to file a substitute declaration to which was attached a copy of the proposed substitute declaration. A judge of the Superior Court after hearing this motion made findings, rulings and an order as follows: “The plaintiff did not move to amend within the ten days or there*372after until March 20, 1933, nearly two years and a half after the order sustaining the demurrer. Nothing was filed and no action was taken in the interval. Under these circumstances the case was ripe for judgment upon the expiration of the time allowed for appeal from or exception to the order sustaining the demurrer, and actually went to judgment on the first Monday thereafter under Common Law Rule 56 (1923). G. L. c. 235 § 1. ... I deny the plaintiff’s request for ruling attached hereto, and I rule as matter of law that the plaintiff’s motion to amend cannot be allowed at this time, and order said motion dismissed and said motion and ‘Plaintiff’s Substitute Declaration’ stricken from the files.” The findings, rulings and order also contained the following: “At the hearing of this motion I heard statements of counsel and evidence from the plaintiff himself as to the reasons for the plaintiff’s delay in moving to amend his declaration. In consequence of facts then appearing, I would, if it were a matter of discretion, though with some hesitation, allow the plaintiff to file a proper substitute declaration at this time, notwithstanding the delay; but I would not allow the proposed substitute declaration which was filed with the motion for the reason that such proposed declaration does not seem to me to show clearly” certain facts. Thereafter the plaintiff filed a further motion to file a substitute declaration accompanied by a proposed substitute declaration. Upon this motion the judge who had dealt with the earlier motion made the following order: “I would allow the within motion in so far as it is a mere matter of discretion but I rule, as I have heretofore ruled, that this action has gone to judgment. ... I therefore deny the plaintiff’s request for ruling hereto attached and order this motion dismissed and the motion and proposed substitute declaration stricken from the files.” Exceptions saved by the plaintiff to these orders were never perfected.
1. The judge at the hearing on the affirmative defence of res judicata was right in ruling, on the record and pleadings in the earlier case between the same parties introduced in evidence, that the defence of res judicata was made out.
*373The governing principle, as stated in Whitney v. Whitney, 299 Mass. 547, 550-551, is as follows: “It is a general rule that a judgment for the defendant founded on a demurrer is not a bar to a second action. The reason for the rule is that such a judgment commonly is based not on the merits but upon the insufficiency of the statement of the cause of action. ... An exception to that general rule has grown up in cases where the plaintiff has been given leave to amend his pleading and has declined to amend and a judgment has thereafter been entered founded on the sustaining of the defendant’s demurrer. In such cases a judgment operates as a bar to a second action. In such a case ‘the judgment rendered on demurrer commonly is treated as based on the merits.’ Keown v. Keown, 231 Mass. 404, 408. It is well settled that in appropriate circumstances a judgment rendered on a demurrer is as conclusive as one rendered upon the hearing of evidence. ... In these conditions, where a plaintiff has refused to amend his pleading a judgment rendered on a demurrer causes the matter to become res ¡judicata as between the parties ‘as
to every issue which was or might have been litigated in that action and’ estops the plaintiff ‘from contesting the matter further.’ Correia v. Portuguese Fraternity, 218 Mass. 305, 307. . . . The doctrine of res judicata, therefore, applies where the issues have in fact been fully tried and in cases where the plaintiff has had ample opportunity to state his cause of action completely and correctly so as to have the issues tried but has refused to embrace that opportunity.” The exception here stated to the rule that ordinarily a judgment founded upon the sustaining of a demurrer does not constitute res judicata is to be distinguished from the exception to this rule “when the demurrer in the earlier action is based on the merits.” Capaccio v. Merrill, 222 Mass. 308, 310, and cases cited. Abbott v. Bean, 295 Mass. 268, 273. See also McGrath v. Sullivan, 303 Mass. 327, 328-329. In the case now before this court the record and pleadings in the earlier case do not show that the demurrer to the declaration in that case was sustained on the merits. But the exception stated in the *374Whitney case is applicable, and a judgment rendered on the sustaining of a demurrer is "treated as based on the merits” (Keown v. Keown, 231 Mass. 404, 408), when, though the demurrer was sustained by reason of insufficiency of the statement of the cause of action or other defect in form or substance in the declaration, the plaintiff had an opportunity to amend for the purpose of correcting the defect in the declaration and did not avail himself of the opportunity.
On the evidence that was admitted, the present case as matter of law falls within the exception stated in the Whitney case. The first of the two elements essential to bring a case within this exception is, as commonly stated, that the plaintiff had been given "leave to amend” his declaration in the earlier case. Capaccio v. Merrill, 222 Mass. 308, 310. Keown v. Keown, 231 Mass. 404, 408. Abbott v. Bean, 295 Mass. 268, 275. Whitney v. Whitney, 299 Mass. 547, 550. Keljikian v. Star Brewing Co. 303 Mass. 53, 62. While in the opinion in the Whitney case (page 550) this common expression is used, elsewhere in the opinion this essential element is described as that “the plaintiff has had ample opportunity to state his cause of action completely and correctly so as to have the issues tried” (page 551), obviously with the same meaning. See also Correia v. Portuguese Fraternity, 218 Mass. 305, 307. The words “leave to amend” are sometimes used as meaning the actual allowance of an amendment. See Rule 23 of the Superior Court (1932). But as used in these opinions and in an order sustaining a demurrer they do not mean the actual allowance of an amendment but mean rather "the exercise of discretion in favor of, rather than against, the filing of a permissible and appropriate amendment.” Massachusetts Gasoline & Oil Co. v. Go-Gas Co. 267 Mass. 122, 126. Allowance of an amendment, therefore, is necessary if the amendment is to be effective. Kaufman v. Buckley, 285 Mass. 83, 86. Nevertheless, giving to a plaintiff "leave to amend” his declaration within a fixed period furnishes him “ample opportunity to state his cause of action completely and correctly so as to have the issues tried,” or at *375least ample opportunity to move for an amendment to that end, and places upon him the burden of availing himself of such opportunity if the judgment entered upon the sustaining of the demurrer is not to be treated as based upon' the merits of the case. The record and pleadings in the earlier case that were in evidence at the hearing in the present case establish that the plaintiff had such an opportunity in the earlier case. The plaintiff was bound to take notice of the entry of the order giving him “leave ... to amend within ten days.” Kaufman v. Buckley, 285 Mass. 83, 86.
The second of the two elements essential to bring a case within the exception stated in the Whitney case is, as commonly stated, that the plaintiff has “refused” or “declined” to amend his declaration or to avail himself of the opportunity to do so. Correia v. Portuguese Fraternity, 218 Mass. 305, 307. Capaccio v. Merrill, 222 Mass. 308, 310. Keown v. Keown, 231 Mass. 404, 408. Abbott v. Bean, 295 Mass. 268, 275. Whitney v. Whitney, 299 Mass. 547, 550-551. Keljikian v. Star Brewing Co. 303 Mass. 53, 62. But refusal or declination so to do has no more significance in this connection than failure so to do. See Freeman on Judgments (5th ed.) § 747. Indeed, in the Keown case, though the word “declines” is used in one sentence, in the next preceding sentence occurs the language: “the plaintiff was given leave to amend his bill within thirty days after the order sustaining the demurrer, and did not avail himself of that privilege.” This language accurately states the elements essential to bring a case within the exception here under consideration to the ordinary rule that a judgment founded upon the sustaining of a demurrer does not constitute res judicata.
By a special order giving a plaintiff “leave to amend” within ten days, he is, in effect, given that period of time “within which to decide whether he can, or ought to, file a motion for amendment” (Kaufman v. Buckley, 285 Mass. 83, 86), and if he has filed no such motion he is to be taken to have elected to stand on the declaration as originally filed, for the purpose of determining whether a judgment *376entered upon the sustaining of a demurrer is to be “treated as based on the merits” as well as for other purposes. See Robitaille v. Morse, 283 Mass. 27, 35. And such a plaintiff must be held to his election at least so long as the judgment stands. Clearly “leave to amend,” where granted by a special order, does not contemplate the actual filing by a plaintiff of a declination or refusal to amend or to avail himself of the opportunity to file a motion to that end or to take any other appropriate step. A plaintiff’s election is shown by his failure to avail himself of the privilege granted. And since a plaintiff is bound to take notice that leave to amend has been granted, it is immaterial whether or not he had actual notice that this privilege was granted.
The language of the court in some of the cases referring to estoppel (see Correia v. Portuguese Fraternity, 218 Mass. 305, 307; Whitney v. Whitney, 299 Mass. 547, 551) does not require a different conclusion. Apparently this language in these cases refers to estoppel by judgment — a name sometimes applied to the doctrine of res judicata or to the effect of this doctrine. See Burlen v. Shannon, 99 Mass. 200, 202-203; Foye v. Patch, 132 Mass. 105, 112; Sly v. Hunt, 159 Mass. 151, 153; Giedrewicz v. Donovan, 277 Mass. 563, 565-566; Olsen v. Olsen, 294 Mass. 507, 509. But even if these references are not to estoppel by judgment but are rather to estoppel as commonly understood (see Freeman on Judgments [5th ed.] § 747), the elements of such an estoppel as applied to the situation disclosed by the record in the present cases are shown. It is said in Freeman on Judgments (5th ed.) § 747 that the estoppel of a judgment entered upon the sustaining of a demurrer is an estoppel “arising where a party litigant attempts to assume inconsistent and contradictory positions with respect to the same matter.” The proposition that a litigant cannot assume inconsistent and contradictory positions is established by our decisions. Boston v. Nielsen, 305 Mass. 429, 433. The position now taken by the plaintiff that the judgment entered in the earlier case upon the sustaining of the demurrer , is not to be treated as entered upon the merits is inconsistent with the position taken by him in the earlier case *377when he failed to avail himself of the opportunity afforded him to have that case tried upon the merits. The plaintiff was charged with knowledge that “leave ... to amend” his declaration had been given. The giving of such “leave . . . to amend” imposed a duty upon him to move for an amendment if the judgment upon the sustaining of the demurrer was not to be treated as based upon the merits. An estoppel may be made out by nonaction when there is a duty to act. See D’Almeida v. Boston & Maine Railroad, 224 Mass. 452, 456, and cases cited. By the failure of the plaintiff to move to amend, the defendant was injured by being deprived of a right to defend the earlier action upon the merits if the judgment entered therein upon the sustaining of the demurrer is not now to be treated as having been based upon the merits. And the defendant necessarily relied upon the nonaction of the plaintiff. He had no other course. See Broitman v. Silver, 278 Mass. 510, 513.
2. The evidence offered by the plaintiff and excluded at the hearing on the affirmative defence of res judicata was excluded rightly. It was immaterial to any issue before the court. The record shows that the demurrer in the earlier case was sustained and leave to amend within ten days given on October 6, 1930. It is apparent from the record — and, as appears from the record, the judge who heard a motion to amend in 1933 ruled — that the case went to judgment in the year 1930. The evidence offered and excluded was that the plaintiff “hired an attorney ... to prosecute his action; that between 1930 and 1933 from time to time he communicated with his attorney, and asked him when the case was going to be reached for trial; that his attorney kept telling him that the case would be reached for trial in due course; that in 1933, on or about March 14, he requested . . . [another attorney] to check the docket entries in his case, and that the latter in checking the docket entries found that a- demurrer to . . . [the] declaration had been sustained by the court, and that leave to amend in ten days was given; that no further action was taken” by the original attorney; that the plaintiff “engaged counsel who took steps at once to file a substi*378tute declaration . . . that this plaintiff at no time refused so far as he was concerned to amend the declaration within ten days, but was entirely ignorant of what had happened until the time when he engaged new counsel on March 14, 1933, . . . that the plaintiff, had he known the facts, would have been willing and most anxious to amend his declaration within the ten days specified in the order of the court, and that at no time has the plaintiff elected, orally or in writing, to stand on the old declaration; [and] that the plaintiff has not only not refused, but has also not declined to take steps to amend the original declaration.”
The evidence that the plaintiff was ignorant of the order sustaining the demurrer and giving him leave to amend was immaterial since he was bound to take notice thereof. Kaufman v. Buckley, 285 Mass. 83, 86. The evidence that the plaintiff at no time “elected, orally or in writing, to stand on the old declaration” and “that the plaintiff has not only not refused, but has also not declined to take steps to amend the original declaration,” also was immaterial. Clearly the evidence offered referred to affirmative action by the plaintiff but, as already stated herein, failure to file a motion to amend the declaration constituted such an election, and it is immaterial that the plaintiff never affirmatively refused or declined to do so. He is bound by his failure to file such a motion disclosed by the record. So far as the evidence offered tended to show negligence or misconduct on the part of the plaintiff’s attorney, it cannot avail the plaintiff to destroy the effect as res judicata of the judgment entered in the earlier action. While the judgment in the earlier action stands it constitutes a bar to the present action between the same parties in accordance with the doctrine of res judicata. And this judgment cannot be impeached collaterally by the plaintiff on the ground that it was obtained, by reason of negligence or misconduct of his attorney in the earlier action. Young v. Watson, 155 Mass. 77, 78. Long v. MacDougall, 273 Mass. 386, 388. Noyes v. Bankers Indemnity Ins. Co. 307 Mass. 567, 569.
Judgment for the defendant.