delivered the opinion of the Court.
This case is inseparably intertwined with Chabrán v. Méndez, 74 P.R.R. 719. We therefore first set forth what took place in the Méndez case. In the latter we affirmed a judgment dismissing a filiation suit filed in 1950 by Angé-lica Chabrán Hernández, representing her minor son, Zoilo Eduardo Chabrán, against Zoilo Méndez Ríos.
Our reasoning in the Méndez case was as follows: Frank Chaulón obtained a divorce from Angélica Chabrán on January 26, 1945. Under § 113 of the Civil Code, 1930 ed., 31 L.P.R.A. § 461, Zoilo Eduardo who was born to Angé-lica on June 23, 1945, was the presumptively legitimate child of Chaulón and Angélica. Under § § 116 and 117 of the Civil Code, 31 L.P.R.A. § § 464 and 465, only the husband, Frank Chaulón, or his legitimate heirs could challenge the legitimacy of the child; and a valid judgment in favor of the plaintiff in such a legitimacy suit was a condition precedent for the filiation suit against Méndez.1 Frank Chaulón *288filed such a legitimacy suit and obtained a judgment declaring that Zoilo Eduardo was Angélica’s natural child; but this judgment was void because the child, an indispensable party, was not joined as a defendant.2 Accordingly, the dismissal of the filiation complaint was affirmed because it toas ;prematurely filed.
In the Méndez case we made it clear at p. 733: “The defendant has not won this suit because the trial court has. found on the facts that Zoilo E. Chabrán is not his natural child. On the contrary, the only reason he prevails here is because § 113 of the Civil Code raises a presumption of legitimacy; under § 116 only the husband or his legitimate heirs can contest the said legitimacy; and the plaintiff is unable to produce a valid judgment declaring the child illegitimate. An impediment therefore exists preventing a filiation suit at this time by the plaintiff against the defendant. Shortly stated, the present filiation suit is premature. But the legal situation may change: the impediment against a filiation suit may be removed in the future by a valid judgment in a legitimacy suit. If that should occur, under the principle just stated the doctrine of res judicata would not prevent a new filiation suit by the plaintiff against the defendant, based on the changed legal situation, provided it is not barred by prescription under § 126 of the Civil Code.”'
We pointed out at p. 734 that “[t]he child therefore can*289not pursue the matter any further unless and until the legitimate heirs of Frank Chaulón take some action under § 116.” We then made some comments, which are controlling on the case noiu before us, at pp. 734-6:
“Again because the status of a minor is involved we deem it advisable to make some comments which will become pertinent only if the legitimate heirs of Frank Chaulón attempt to exercise their rights under § 116. We agree, as the lower court held, that there is no way to ‘correct the judgment’ in the legitimacy case without amending the pleadings, in view of the failure to join Zoilo E. Chabrán as a defendant in the original complaint. On the other hand, when the status of a minor is involved, we think the parties should be given every reasonable opportunity to adduce testimony on the facts and to obtain a decision on the merits. We therefore see no objection to a renewal by the legitimate heirs of Frank Chaulón of the contention that the child is not legitimate. If one of the heirs refuses to become a plaintiff in such a legitimacy suit, we see no reason why this should bar the other heirs from pursuing their cause of action under § 116 of the Civil Code. The restrictive policy of the law behind § 116 having been fulfilled by requiring that at least one of the heirs shall voluntarily appear as a plaintiff in such a suit, the other heirs may, as in other situations, be joined as defendants if they refuse to appear as plaintiffs. See Rule 19(a) of the Rules of Civil Procedure; Vega v. Cía. Popular de Transporte, 72 P.R.R. 491. Also, our holding that the judgment in the legitimacy case is void does not wipe out the complaint in that case. Consequently, the heirs of Frank Chaulón or one of them if he chooses may continue the legitimacy suit originally begun by Frank Chaulón. Or such heirs or one of them may institute a new suit contesting the legitimacy of Zoilo E. Chabrán. But in either event, as already noted, Zoilo E. Chabrán will be an indispensable party defendant. And we assume that the mother would admit, as she did in her answer in the original legitimacy suit, that in fact the child was not legitimate because of physical impossibility of access to her by the husband during the crucial period. Under those circumstances it would be the better practice for the trial court to appoint a guardian ad litem for the child rather than to permit the mother to represent him, in view of *290the possible conflict under those circumstances of the interests of the mother and the child. See Rule 17 (f) of the Rules of Civil Procedure and Biaggi v. District Court, [68 P.R.R. 378] supra. And to avoid the possible contention that a judgment based on facts admitted in the answer was in substance a settlement with regard to status, in violation of § 1713 of the Civil Code, the trial court should take testimony on the issues in the case and make findings of fact based on the testimony.
“We have not overlooked the possibility that in any future legitimacy suit the defendants may contend that the cause of action is barred by the statute of limitations. In deciding the motion for summary judgment, the Humacao court did not pass on the contention made before it by the defendant, which is not renewed before us by the defendant in this appeal, that the cause of action in the filiation suit had prescribed. We like-wise have not passed on that question, for the rule is that even if it might seem from the pleadings as though the action was barred by the statute of limitations, a judgment may not be attacked collaterally on that ground. There may have been a number of reasons, including waiver, why the court which entered the judgment found that the statute of limitations did not apply. Herron v. Dater, 120 U. S. 464, 477; Palmer v. Board of Chosen Freeholders, 71 Atl. 285 (N. J., 1908); Head v. Daniels, 15 Pac. 911 (Kans., 1887). See also, by analogy, Colt v. Colt, 111 U. S. 566; Association Oil Co. v. Mullin, 294 Pac. 421 (Cal., 1940); Schodde v. United States, 69 F. 2d 866 (C. A. 9, 1934); Capper v. Short, 11 S. W. 2d 717 (Ky., 1928).
“As we have undertaken to discuss other aspects of the litigation which may conceivably arise in the future with reference to a challenge to the legitimacy of Zoilo E. Chabrán in the pending legitimacy suit or in a new case, we think we should add that what approach they desire to use on the question of prescription, on which we express no opinion,, is for the true parties in interest exclusively to determine. Cf. Fuentes v. District Court, [73 P.R.R. 893] supra; Meléndez v. Iturrondo, [71 P.R.R. 56] supra; Bithorn v. Santana, 68 P.R.R. 281. For example, we assume arguendo that the statute of limitations has run. Even under those circumstances it is for the guardian ad litem of Zoilo E. Chabrán to determine whether the best interests of the child would be served by waiving prescription. That is a matter on which Zoilo Méndez cannot be heard in *291the legitimacy suit. Even if he should file a petition for inter'vention in such a suit and it should he granted, he could intervene at the most to prevent a finding, which is not appropriate in the legitimacy case, that he is the father of the child. He may be entitled to argue that that issue should not be adjudicated in the legitimacy suit. See Cubano v. Del Valle [69 P.R.R. 538] supra. But he can have no intervention in the true issue before the court, the legitimacy of the child, including such questions as whether the right of the husband or his legitimate heirs to challenge legitimacy is barred by prescription, or whether the defendants may waive such prescription.”
The foregoing discussion puts the present case in proper focus. In accordance with our above-quoted language in the Méndez case, Frank Chaulón, Jr.,3 as one of the legitimate heirs of Frank Chaulón and represented by a guardian ad litem, requested and obtained permission from the Superior Court to file an amended complaint in the legitimacy suit substituting himself for his deceased father as plaintiff and including — in addition to Angélica, who was the original defendant — Zoilo Eduardo, represented by a guardian ad litem, and Maria Elisa Chaulón, as party defendants. Maria Elisa is the other legitimate heir of Frank Chaulón, Sr. She was included as a defendant because she refused to join Frank, Jr., as a plaintiff in the amended complaint.
None of the defendants filed an answer. Maria Elisa did not appear at the hearing. The guardian ad litem for Zoilo Eduardo and her counsel were present at the hearing. The said counsel announced, on behalf of the guardian ad litem, that the latter accepted the allegations of the complaint. Although Angélica Chabrán filed no answer to the amended complaint, she appeared at the hearing and testified.
Angélica Chabrán and other witnesses, including the guardians ad litem of both Zoilo Eduardo and Frank Chau-lón, Jr., all testified without contradiction, that Angélica left *292Frank Chaulón, Sr., in 1941; that from July 1944 until January, 1945 the latter was in the United States, receiving treatment for attacks of “delirium tremens”, which had made him sexually impotent; and that Zoilo Eduardo, born on June 23, 1945, could not have been and was not the child of Frank Chaulón, Sr. No testimony was offered on behalf of the defendants.
In spite of the foregoing, the trial court entered a judgment dismissing the amended complaint in the legitimacy suit. The instant case is an appeal from that judgment.
The trial court failed to apply the above-quoted language, which we carefully formulated in the Méndez case at pp. 734-736, for the disposition of the legitimacy suit. All the steps which we outlined in the Méndez case were taken by the persons involved. Frank Chaulón, Jr., exercised his rights as one of the legitimate heirs of Frank Chaulón, Sr., by filing an amended complaint challenging Zoilo Eduardo’s legitimacy. Since Maria Elisa refused to join Frank Chaulón, Jr., as a plaintiff, the latter joined her as a defendant. In the amended complaint Zoilo Eduardo was made a defendant. And in view of the possible conflict of interests of the mother and the child, a guardian ad litem was named and appeared for Zoilo Eduardo. Undisputed and detailed evidence was presented showing the physical impossibility of access to the wife by the husband during the crucial period. It was therefore clearly the duty of the trial court to enter a judgment in favor of the plaintiff to the effect that Zoilo Eduardo was Angélica’s natural child.
The trial court took a different course. Despite our above-quoted language in the Méndez case specifically warning against such an approach, the Superior Court sua sponte adduced several technical reasons in support of its judgment dismissing the complaint. We do not stop to examine them in detail.4 None of them, as we pointed out in our opinion *293in the Méndez case at pp. 735-6 in discussing the question of prescription, was of a nature which the defendants could not waive if they chose. Here the defendants, who were properly represented, waived all these points. It was not the function of the trial court to search the record and on its own initiative to dismiss a complaint of this type on such technical grounds which may be and were waived by the parties, particularly if the result would be to deprive a child of his day in court to prove his claim as to his true status.
To avoid possible confusion in the future, we make a final point. If the Méndez case had arisen more recently, the result would have been different. Subsequent to the Méndez case, a majority of this Court concluded that, notwithstanding $ 116 of the Civil Code, a filiation suit may be brought claiming that a child born after the effective date of Act No. 229 of 1942 was a natural child, despite the fact that his mother was married to another man during the crucial period. Agosto v. Javierre, supra.5 Obviously, by our contrary holding in the Méndez case, at that time we deprived Zoilo Eduardo of his right to press his filiation suit. It follows that, to avoid manifest injustice, the previous ruling in the Méndez case, plus its corollary, must *294prevail on a theory analogous to “law of the case”. Cf. Commissioner v. Sunnen, 333 U. S. 591; Developments in the Law—Res Judicata, 65 Harv. L. Rev. 818, 822, 843; Commonwealth v. Ocean Park Development Corp., ante, p. 149.
As already indicated, the previous ruling in the Méndez case was that under § 116 of the Civil Code only the husband or his legitimate heirs could challenge Zoilo Eduardo’s legitimacy, thereby requiring us to affirm the dismissal of the filiation complaint in the absence of a judgment in a legitimacy suit brought by the husband or his legitimate heirs. More important for present purposes, the corollary thereof, as noted in the above-quoted language from p. 733 of the Méndez case, was that res judicata would not prevent a new filiation suit by Zoilo Eduardo against Zoilo Ménlez once a valid judgment (which we shall issue in this case) is entered in a legitimacy suit brought by the husband or his legitimate heirs. The latter doctrine — the corollary — 'would apply against the defense of res judicata in any future filiation suit.
In the Méndez case we held that § 116 temporarily barred Zoilo Eduardo’s filiation suit. It is true that later we repudiated that rule in the Javierre case. But we can scarcely apply the latter case to Zoilo Eduardo, insofar as res judicata of the filiation claim is concerned, in view of the fact that the interested parties, relying on the Méndez case, pursued the remedy we suggested therein of first obtaining a valid judgment in the legitimacy suit before instituting a new filiation case. Solely for purposes of this specific case, we must necessarily adhere to the view expressed in the Méndez case that any subsequent filiation suit filed by Zoilo Eduardo against Méndez will not be subject to the defense of res judi-cata predicated on our judgment upholding the dismissal of the filiation complaint in Chabrán v. Méndez, supra. To hold otherwise would be to entrap Zoilo Eduardo because the majority of the Court changed its views as to § 116 as found •in the Méndez case when it decided the Javierre case.
*295Zoilo Eduardo Chabrán was born in 1945. Since 1950 he has been seeking access to the courts, through his mother, Angélica Chabrán, to prove if he can, his claim that he is the natural child of Zoilo Méndez. In this case we clear the roadblock which we previously thought existed against his action by virtue of § 116 of the Civil Code. It is high time Zoilo Eduardo received his day in court. If and when a new filiation suit is filed on his behalf against Méndez, the courts should proceed without further delay to determine it.
The judgment of the Superior Court will be reversed and a new judgment entered decreeing that Zoilo Eduardo Cha-brán is not the legitimate child of Frank Chaulón and is the natural child of Angélica Chabrán Hernández.
Mr. Justice Sifre agrees with the result.Cf. Agosto v. Javierre, 77 P.R.R. 444, which is discussed hereinafter.
In the Méndez case we permitted the defendant, Zoilo Méndez, to make a collateral attack on the judgment in the legitimacy suit. We pointed out at p. 726: “A collateral attack may he made on a judgment, on the ground that it is void because the court which rendered the judgment had no jurisdiction of an indispensable party, by a person who was not a party to the suit, provided the latter is adversely affected by the judgment.” We added at p. 727: “. . . although Zoilo Méndez was not a party to the legitimacy suit . . . , when the judgment in favor of the plaintiff therein is invoked as a necessary condition precedent to the filiation suit against him ... , he is adversely affected by the said judgment and is therefore entitled to make a collateral attack on it by establishing if he can that the judgment is void because the child, as an indispensable party, was never joined as a defendant in the legitimacy suit.” (Italics ours.)
Although the pleadings call him simply Frank Chaulón, we have added “Jr.” to his name to avoid confusing him with his father.
They were as follows: (a.) Requirement of permission of the trial court under Rule 25(a) (1) of the Rules of Civil Procedure for the sub*293stitution of Frank Chaulón, Jr., as the plaintiff after the death of Frank Chaulón, Sr.; (ó) a similar requirement of permission as to the joinder of additional defendants under Rule 19(6); (e) the original complaint did not state facts constituting a cause of action; and being fatally defective, because it did not state such facts, it is not susceptible of amendment; (d) permission may not be granted to amend a complaint when the purpose of the amendment is to replace the only defendant with a different person; (e) for the reasons given by the trial court, which we. deem it unnecessary to set forth, the action had not been properly brought under $ § 116 and 117 of the Civil Code. We by no means intimate that any of the points made by the trial court are well-taken. We see no purpose in discussing them since the defendants did not raise them and they were therefore waived. On this question, in addition to what we have already quoted from the Méndez case, see footnote 11 thereof, pp. 736-7.
On January 19, 1956 we entered an order denying a motion for reconsideration in the Javierre case. This order recites that Mr. Justice Saldana agrees with the opinion therein of Mr. Justice Negrón Fernández.