[¶ 1] Gary and Shirley Wolff (Wolffs) appeal the trial court’s dismissal of then.’ action against the Secretary of the South Dakota Department of Game, Fish and Parks (the Secretary). We affirm.
FACTS
[¶ 2] Wolffs own a parcel of real property near the Angostura State Recreation Area (Angostura). The United States Government acquired Angostura in 1949 when the area was condemned pursuant to the Flood Control Act of 1944. The State of South Dakota leases Angostura from the federal government and the South Dakota Department of Game, Fish and Parks (the Department) manages the recreation area.
[¶ 3] In May 1987, the Department closed a roadway into Angostura that Wolffs had been using for ingress to and egress from their property. Although Wolffs provided no notice of injury to the Commissioner of Administration or the Attorney General,1 on June 26, they served a summons and complaint on the Secretary alleging: violation of thefr rights of due process and just compensation; trespass; wrongful and unlawful interference with the use and enjoyment of their property; forcible ejectment or exclusion from the possession of their property; and, the deprivation of their constitutional rights, privileges and immunities under 42 U.S.C. § 1983. Wolffs sought: an injunction to prevent the Secretary from denying them access to their property; actual damages of $250,000 for the loss of access to their property; an alternative award of treble damages totaling $750,000 for forcible ejectment or exclusion from their property; an alternative award of $250,000 for the deprivation of their constitutional rights; plus, their attorney fees and costs.
[¶ 4] The Secretary subsequently answered the complaint raising some twenty-two affirmative defenses including failure to state a claim on which relief could be granted and sovereign immunity. However, the answer failed to raise any affirmative defense concerning lack of notice of Wolffs’ claim under SDCL 3-21-2 and 3-21-3.
[¶ 5] A hearing on the issuance of a preliminary injunction to prevent closure of the roadway was held on November 13, 1987. On March 29, 1988, the trial court issued its memorandum opinion denying the injunction. Findings of fact, conclusions of law and an order in conformity with the memorandum opinion were subsequently entered.
[¶ 6] The record reflects no activity in the file from May 4, 1988 until May 17, 1990 when Wolffs filed a certificate of readiness for trial. In response, the Secretary filed a motion to dismiss for failure to prosecute. An order denying the motion was entered on September 18, 1990. Extensive discovery proceedings followed.
[¶ 7] On February 23, 1994, the Secretary filed a motion for summary judgment alleging a lack of proof that Wolffs are entitled to any prescriptive easement benefitting their *533property and a lack of proof that the roadway at issue is a public highway. In response to the Secretary’s motion, the trial court sent a letter to Wolffs’ counsel advising counsel of the time limit for filing a brief in response to the Secretary’s “Motion to Dismiss for Failure to Prosecute.”2 In answer to that letter, the Secretary’s counsel advised the trial court that Circuit Judge Young had already ruled on the motion to dismiss for failure to prosecute, but, that he would renew his motion in that regard.
[¶ 8] On September 29,1994, the Secretary filed an additional set of motions including a motion to dismiss, “by reason of the failure of [Wolffs] to give the requisite jurisdictional notice required by §§ 3-21-2 and 3.” This was the first time in these proceedings that the Secretary raised the notice issue. The Secretary subsequently filed affidavits by the Commissioner of the Bureau of Administration and the Attorney General averring they were never given written notice of the time, place and cause of Wolffs’ injury as required by SDCL 3-21-2 and 3-21-3.
[¶ 9] On December 19, 1994, the trial court issued its memorandum decision dismissing Wolffs’ action for failure to comply with the notice provisions. On December 29, the trial court entered the following order in conformity with its memorandum decision:
ORDERED that the above-entitled matter be, and it is hereby dismissed, on the merits and with prejudice, on the grounds and for the reason that [Wolffs] did not give notice to the Attorney General and the Commissioner of Administration, as required by SDCL 3-21-2 and 3-21-3LJ
Wolffs appeal.
STANDARD OF REVIEW
[¶ 10] Wolffs raise several issues in an attempt to obtain a reversal of the trial court’s dismissal of their action. In that regard, we note that the dismissal was granted for Wolffs’ lack of compliance with the notice provisions of SDCL 3-21-2 and 3-21-3. However, Wolffs’ compliance or lack of compliance with the notice provisions was never mentioned in the parties’ pleadings. The rule is well established that:
if, on a motion to dismiss for failure to state a claim upon which relief can be granted, matters outside the pleading[s] are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided in SDCL 15-6-56.
Tibke v. McDougall, 479 N.W.2d 898, 903-904 (S.D.1992).
[¶ 11] Based upon the above rule, the granting of the Secretary’s motion to dismiss must be reviewed as the granting of a motion for summary judgment. In a summary judgment case, this Court’s, “task on appeal is to determine only whether a genuine issue of material fact exists and whether the law was correctly applied.” Pickering v. Pickering, 434 N.W.2d 758, 760 (S.D.1989).
[¶ 12] I. Did the secretary waive the notice defense?
[¶ 13] As their first contention, Wolffs argue that the trial court erred in granting the Secretary summary judgment because the Secretary waived his notice defense by failing to plead it as an affirmative defense in his answer. While we agree that the notice defense should have been raised in the answer, under the facts of this case, we disagree with the proposition that failure to properly raise the defense waived the defense.
[¶ 14] In Brandner v. City of Aberdeen, 78 S.D. 574, 105 N.W.2d 665 (1960), this Court held that notice provisions similar to those currently contained in SDCL 3-21-2 and 3-21-3 were, “in the nature of a statute of limitations, rather than a condition precedent necessary to commence an action, and the failure to comply is an affirmative defense to be pleaded by the party relying on it.” Brandner, 78 S.D. at 577, 105 N.W.2d at 666. Brandner’s holding in this regard was recently reaffirmed in Cody v. Leapley, 476 N.W.2d 257 (S.D.1991) where this Court concluded:
*534if the cause of action is independent of the notice requirement, such as is the case herein in regard to a claim of wrongful seizure of one’s property, the statute is found to be in the nature of a statute of limitation. As such, under SDCL 15-6-8(c) it is in the nature of an affirmative defense and must not only be pled, but to be granted relief under SDCL 15-6-56, it must be established as a matter of uncon-troverted fact.
Cody, 476 N.W.2d at 263 (citations omitted)(emphasis added).
[¶ 15] “Under SDCL 15-6-8(c), a party’s pieadings must affirmatively set forth matters constituting an avoidance or affirmative defense. If such an affirmative defense is not pleaded, it is waived.” Varga v. Woods, 381 N.W.2d 247, 251 (S.D.1986). However, this does not end the inquiry for this Court has also held:
SDCL 15-6-15(b), however, permits issues not asserted in the pleadings to be tried by the parties’ express or implied consent and the failure to formally plead an affirmative defense “is immaterial if the issue was tried by express or implied consent” ...
The test for allowing an adjudication of an issue under ... SDCL 15-6-15(b) tried by implied consent is whether the opposing party will be prejudiced by the implied amendment, i.e., did he have a fair opportunity to litigate the issue, and could he have offered any additional evidence if the case had been tried on the different issue, (footnote omitted; citation omitted.)
Varga, 381 N.W.2d at 251 (citations omitted).
[¶ 16] In this instance, the notice defense was first raised by the Secretary in a motion served on Wolffs on September 28, 1994. The affidavits establishing the lack of notice were subsequently served on Wolffs on October 6 & 7. Shortly thereafter, on October 12, Wolffs served a written response to the motion without any claim of prejudice or lack of a fair opportunity to litigate the issue. See id. In fact, on October 13, Wolffs filed a pretrial conference checklist specifically mentioning the Secretary had raised certain legal issues by motion which they had answered in their brief. Even more pertinent, the conference checklist states, “The [Secretary] has filed certain motions with the circuit clerk which plaintiff is prepared to argue at the pretrial hearing.” (emphasis added). The checklist also fails to contain any claim of prejudice or lack of opportunity to fairly litigate the issue over the notice defense. Id. Finally, it was not until December 19, nearly two months after the Secretary first raised the notice defense, that the trial court issued its decision dismissing the case on the basis of that defense.
[¶ 17] Based upon this record, it is clear that Wolffs had a sufficient amount of time to prepare to rebut the notice defense and that they actually consented to its consideration at the pretrial conference when they stated they were prepared to argue the motion at that time. Accordingly, although the Secretary failed to appropriately raise the notice defense in his answer, the record is clear that he did not waive the defense since it was tried with the implied consent of the parties.
[¶ 18] II. Were Wolffs required to give notice as to all of their causes of action?
[¶ 19] Wolffs next contend that, even though they might have been required to give notice of injury as to their cause of action for trespass, they were not required to give notice as to their remaining causes of action. Accordingly, Wolffs contest the trial court’s summary judgment on those causes of action.
[¶ 20] In support of their contention, Wolffs rely on the language of SDCL 3-21-2 emphasized below:
No action for the recovery of damages for personal injury, property damage, error or omission or death caused by a public entity or its employees may be maintained against the public entity or its employees unless written notice of ... the injury is given ... (emphasis added).
This Court has interpreted SDCL 3-21-2 as requiring notice of injury for all causes of action sounding in tort. Finck v. City of Tea, 443 N.W.2d 632 (S.D.1989). While the verbiage in Wolffs’ complaint is inartful, it appears to be sufficient to request injunctive *535relief and to raise the causes of action they contend they raised: forcible exclusion and ejectment; inverse condemnation; and, deprivation of rights under 42 U.S.C. § 1988. Thus, as to any of these causes of action that sound in tort, Wolffs were required to provide notice of injury. Finck, 443 N.W.2d at 632.
[¶ 21] Wolffs’ cause of action for forcible exclusion and ejectment is based upon SDCL 21-3-6 which provides for treble damages, “[f]or forcibly ejecting or excluding a person from the possession of real property[.]” This is a remedy in the Chapter of the South Dakota Code outlining the “Damages for Torts.” SDCL ch. 21-3 (emphasis added). Thus, the remedy obviously arises out of a tort-based claim. Wolffs should have given notice of injury as a predicate for bringing this cause of action. SDCL 3-21-2; Finck, 443 N.W.2d at 632.
[¶ 22] Wolffs’ causes of action for inverse condemnation and deprivation of rights under 42 U.S.C. § 1983 are a different matter. A cause of action for inverse condemnation based upon a constitutional provision is not a tort-based cause of action. In Minch v. City of Fargo, 297 N.W.2d 785 (N.D.1980), a plaintiff brought suit against a municipality for taking or damaging property without compensation. The municipality pled immunity as one of its defenses. In reviewing the availability of the immunity defense on appeal, the North Dakota Supreme Court held:
While public officials in their discretionary acts and decisions have immunity from claims founded in tort, § 14 of the North Dakota Constitution guarantees that a person will be recompensed for any taking or damaging of his property by the public. Section 14 authorizes a claim for inverse condemnation, which is not barred by the immunity [previously] discussed ... Such a claim proceeds from a constitutional right and must be distinguished from claims grounded in tort theory only.
Minch, 297 N.W.2d at 789 (citations omitted) (emphasis added). In Hurley v. State, 82 S.D. 156, 143 N.W.2d 722 (1966), this Court similarly determined that S.D.Const. Art. VI, § 13 authorizes an action for inverse condemnation. Because the claim proceeds from a constitutional right, it is not grounded in tort and, under the explicit provisions of SDCL 3-21-2, no notice of injury was required to bring the cause of action against the Secretary.
[¶ 23] Wolffs’ claims under 42 U.S.C. § 1983 are a matter of federal law. The United States Supreme Court has held:
[A] state court may not decline to hear an otherwise properly presented federal claim because that claim would be barred under a state law requiring timely filing of notice. State courts simply are not free to vindicate the substantive interests underlying a state rule of decision at the expense of the federal right.
Felder v. Casey, 487 U.S. 131, 152, 108 S.Ct. 2302, 2314, 101 L.Ed.2d 123, 147 (1988). Thus, the notice of injury provisions have no effect whatsoever on the viability of Wolffs’ § 1983 cause of action.
[¶24] Based upon the foregoing, Wolffs’ causes of action for inverse condemnation and under 42 U.S.C. § 1983 should have survived the notice defense under SDCL 3-21-2 and 3-21-3 because they are not tort-based claims for which the statutory notice is required.3
[¶ 25] III. Was the secretary entitled to summary judgment on merits?
[¶ 26] Having reached the conclusion that two of Wolffs’ causes of action should have survived the notice defense under SDCL 3-21-2 and 3-21-3, we note that the foundation of Wolffs’ theory of recovery for *536both of these causes of action is that the Secretary has deprived them of the use of a roadway on which they hold a valid easement. The only theory in the complaint on which Wolffs base their claim for an easement is that they or them predecessors in title acquired an easement by prescription over the roadway at issue.
[¶ 27] The roadway at issue is in Angostura. As previously observed, Angostura is owned by the United States Government and is merely leased to South Dakota for purposes of a recreational area administered by the State. A condemnation judgment in the settled record conclusively establishes that the United States obtained fee title to what is now Angostura by condemnation on May 2, 1949. “[Ojrdinarily an unqualified taking in fee by eminent domain takes all interests although they are not specified in detail, and so easements over lands condemned in fee simple are taken unless they are specifically excluded from the taking.” United States v. Belle View Apartments, 217 F.2d 636, 639 (4th Cir.1954). See also 3 Julius L Sackman, Nichols’ The Law of Eminent Domain § 9.2[5] (Revised 3rd ed 1994)(where fee simple absolute title to land has been acquired, the condemnor acquires all appurtenances thereto and easements, as to which the lands taken constitute the servient estate, are effectively destroyed).
[¶ 28] The condemnation judgment4 reflects no exclusion for the easement Wolffs now claim. Thus, any easement Wolffs might claim was acquired by their predecessors in title was taken by the United States in 1949. Wolffs can claim no easement acquired since that time because:
[T]he United States may not lose property by adverse possession,5 absent properly divesting itself of the property:
The government, which holds its interests here as elsewhere in trust for all the people, is not to be deprived of those interests by the ordinary court rules designed particularly for private disputes over individually owned pieces of property; and officers who have no authority at all to dispose of Government property cannot by their conduct cause the Government to lose its valuable rights by their acquiescence, laches, or failure to act.
Bryant v. Butte County, 457 N.W.2d 467, 471-72 (S.D.1990)(footnote added)(quoting United States v. California, 332 U.S. 19, 40, 67 S.Ct. 1658, 1669, 91 L.Ed. 1889, 1900 (1947)).
[¶ 29] It follows from the above that Wolffs can claim no easement on a roadway in Angostura because any such easement was taken by the United States Government in 1949. It is elementary that Wolffs cannot claim damages from the Secretary for denying them the use of a roadway they have no right to use. While Wolffs might have some claim against the United States Government for taking an easement acquired by their predecessors in title (See 2 Sackman, supra § 5.14 (Revised 3rd ed 1995)(when servient tene*537ment is taken for public use which impairs easement, owner of dominant tenement is entitled to compensation)), that is not the issue in the instant case. In fact, we would have significant questions over the jurisdiction of a state court to entertain any such claim against the United States Government.
[¶ 30] The dissent argues that the Secretary should be estopped from asserting the notice defense of SDCL 8-21-2 and 3-21-3. Even if the thesis of the dissent is correct, and all causes of action survive this affirmative defense, the summary judgment must still be upheld as all of Wolffs’ causes of action are premised on some sort of easement which would have been condemned in 1949 by the United States.
[¶ 31] The facts are undisputed. Wolffs hold no property interest in the road. The State of South Dakota owns no property interest in the road. The United States, a non-party to this case, owns the road in fee. Yet we are supposed to determine that it is appropriate for Wolffs to continue to sue the Secretary over the road. How can the State be estopped from pointing out it can give no property right to the Wolffs over property the State does not own? Neither party having a property right in the road, from what source comes a claim for damages by the Wolffs? In effect, Wolffs ask us to issue an advisory opinion concerning a set of facts that has not, and in all likelihood will never occur, Wolffs and/or the State acquiring an interest in the road.
[¶32] While it is true that the trial court did not consider the merits of this matter in either its memorandum decision or order of dismissal, it is a well entrenched rule of this Court that, where a judgment is correct, it will not be reversed even though it is based on erroneous conclusions or wrong reasons. Sommervold v. Grevlos, 518 N.W.2d 733, 740 (S.D.1994); Kirby v. Western Surety Co., 70 S.D. 483, 488, 19 N.W.2d 12, 14 (1945). In fact, this Court has gone so far as to state that, “[sjummary judgment will be affirmed if there exists any basis which would support the trial court’s ruling.” St. Paul Fire & Marine Ins. v. Schilling, 520 N.W.2d 884, 886 (S.D.1994)(emphasis added). Even the author of the dissent has adhered to these precepts. See e.g. Kehn v. Hoeksema, 524 N.W.2d 879 (S.D.1994). The foundations of this rule are soundly based on principles of judicial economy. It is only appropriate, for reasons of judicial economy, to address issues on appeal that would be capable of repetition on remand. See e.g. Dept of Social Services v. McCarty, 506 N.W.2d 144, 147 (S.D.1993). In this instance, the Secretary has thoroughly briefed the issue of the merits of Wolffs’ suit. Wolffs have had an opportunity to respond and have done so. See Wolffs’ Reply Brief at pages 14-20. Is there any doubt that, were we to reverse the summary judgment as urged by the dissent, these very same arguments would be repeated to the trial court on remand? Moreover, is there any doubt that, in the event the trial court were to rule in a manner contrary to our conclusions herein, the Secretary would urge these very same arguments in yet another appeal to this Court? This ease has been pending since 1987 (approximately nine years). It is a sad example of the very sort of protracted and expensive litigation so commonly condemned by our citizens. The authorities discussed above clearly establish that Wolffs simply cannot prevail. They have sued the wrong party in the wrong court at the wrong time. It was the United States that acquired any interest by condemnation in 1949 that Wolffs’ predecessors would have owned and it is the United States that continues to own the land upon which Wolffs seek to travel. Summary judgment against them was the inevitable result. It is time for that judgment to be affirmed and for this controversy to finally be put to rest.
[¶ 33] Affirmed.
[¶ 34] KONENKAMP, J., concurs. [¶ 35] MILLER, C.J., concurs in result. [¶ 36] SABERS and AMUNDSON, JJ., dissent.. SDCL 3-21-2 provides:
No action for the recovery of damages for personal injury, property damage, error or omission or death caused by a public entity or its employees may be maintained against the public entity or its employees unless written notice of the time, place and cause of the injury is given to the public entity as provided by this chapter within one hundred eighty days after the injury.
At the time of Wolffs' injury in May 1987, SDCL 3-21-3 provided in pertinent part: Notice shall be given to the attorney general and the following officers as applicable:
(1) In the case of the state of South Dakota, to the commissioner of administration^]
SDCL 3-21-3 (Supp 1986). The statute was amended in a manner irrelevant to this case in 1994. 1994 S.D.Sess.L. ch. 40.
. By this time, the case had been reassigned from Circuit Judge Young to Circuit Judge Fitzgerald.
. Wolffs’ request for injunctive relief also fails to constitute a cause of action sounding in tort. "In a case such as this brought for the taking or damaging of private property for a public use without prior payment injunction is a well recognized remedy." Bogue v. Clay County, 75 S.D. 140, 149, 60 N.W.2d 218, 223 (1953)(emphasis added). Thus, an injunction is a remedy, not a tort. Obviously, in this instance, Wolffs were required to provide notice as to any tort for which they were requesting injunctive relief, but, not for the injunctive remedy they were seeking. Therefore, their request for injunctive relief survives the absence of notice of their injury so long as any of their causes of action survive.
. The dissent is troubled over the trial court's conversion of the motion to dismiss into a motion for summary judgment without prior notice to the parties. However, Wolffs do not raise this procedural matter as an issue in this appeal and, therefore, it is not before us.
The condemnation judgment in the settled record is irrefutable and, even in their briefs, Wolffs do not dispute its accuracy. In fact, Wolffs have never disputed that the condemnataion occurred. These are all the facts that the trial court needed to grant the Secretary summary judgment. While it is accurate to state that the condemnation judgment constituted matter outside the pleadings and the trial court should have given notice of its conversion of the motion to dismiss to a motion for summary judgment, any error in this regard was harmless. See Gibb v. Scott, 958 F.2d 814 (8th Cir.1992)(failure to provide parties with notice of conversion of motion to dismiss to motion for summary judgment harmless error where material facts are neither disputed nor missing from the record).
. A prescriptive easement is analogous to adverse possession. Lewis v. Moorhead, 522 N.W.2d 1 (S.D.1994). A prescriptive easement is distinguishable from adverse possession to the extent that the user "acquires only an easement and not title." Black's Law Dictionary 1065 (5th ed 1979). Similar to adverse possession, "[t]o claim the benefit of an easement by prescription, a person must show open, continued, and unmolested use of the land in the possession of another for the statutory period. The statutory period for prescriptive easements, like that for adverse possession, is twenty years.” Travis v. Madden, 493 N.W.2d 717, 720 (S.D.1992) (citations omitted).