
95 Cal.Rptr.2d 779 (2000)
80 Cal.App.4th 1093
Michael THALER, Plaintiff and Appellant,
v.
HOUSEHOLD FINANCE CORPORATION et al., Defendants and Respondents.
No. A088570.
Court of Appeal, First District, Division Five.
April 25, 2000.
As Modified May 18, 2000.
*780 Law Office of Dena R. Thaler, Dena R. Thaler and Kathleen Marie Moura, Oakland, for Appellant.
Law Office of Rachel J. Dragolovich and Rachel J. Dragolovich, for Respondents.
STEVENS, J.
Michael Thaler (Thaler) appeals from an order sustaining respondents' demurrer to his first amended complaint without leave to amend. He contends the trial court erred in finding, under Civil Code section 1367,[1] that his interest in certain real property was subordinate to the second deed of trust of one of the respondents. This appeal presents a question of first impression regarding the relative priority of a homeowner association assessment lien and an *781 earlier-recorded second deed of trust, under section 1367, where pre-existing covenants, conditions, and restrictions (CC & R's) on the property recite a "present lien" with power of sale to secure payment of such assessments. We conclude, notwithstanding the CC & R's, that the second deed of trust has priority over the later-recorded notice of delinquent assessment. Accordingly, we affirm the order of the trial court.

I. FACTS AND PROCEDURAL HISTORY

In 1998, Thaler purchased a condominium at a non-judicial foreclosure sale held pursuant to an assessment lien that had been recorded on the property in 1997. Also in the record of title was a second deed of trust recorded in 1992 by the predecessor of respondent Household Finance Corporation (Household).[2]
Thaler and Household disputed whether Thaler's interest in the property was subject to Household's second deed of trust. Thaler therefore filed suit against Household in Alameda County Superior Court, seeking to quiet title and recover damages. Household filed a demurrer to Thaler's complaint. The trial court sustained the demurrer, but granted Thaler leave to amend to allege facts supporting the claim that his interest in the property was not subject to Household's second deed of trust.
In May 1999, Thaler filed his first amended complaint, seeking declaratory relief, quiet title, and damages. Thaler alleged that the subject property is part of a residential project subject to the "California Condominium Act." As relevant here, record title to the property, as of the time of the sale to Thaler, reflected the following: (1) a declaration of CC & R's of the Heritage Commons Homeowners Association (Homeowners) originally recorded in 1984 and subsequently amended and re-recorded in 1985; (2) a second deed of trust in favor of Household's predecessor recorded in 1992; and (3) a notice of delinquent assessment (the Assessment Lien) recorded by Homeowners in October 1997.[3]
As further alleged in the first amended complaint, the CC & R's authorize Homeowners to levy assessments on the owners of individual condominium units for the operation and maintenance of the project as a whole. The CC & R's purport to create a separate and present lien with power of sale against each unit in order to secure payment of the assessments. Homeowners may enforce and foreclose any liens created by the CC & R's by private power of sale, "as provided in Division III, Part 4, Title XIV, Chapter 2, Article I of the Civil Code of the State of California and Civil Code Section 1356, as such statutes may be revised, amended or altered from time to time...." The CC & R's further provide that the assessment lien shall be subordinate to any recorded first mortgage or first deed of trust, but they are otherwise silent with respect to their priority over other recorded conveyances.
According to the first amended complaint, Thaler purchased the property in May 1998, for the sum of $6,117.15, at the foreclosure sale arising out of the Assessment Lien. Recorded in the following month was the trustee's deed upon sale, which confirmed that the property was conveyed to Thaler pursuant to the Assessment Lien and the trustee's powers under sections 1366 and 1367 (the statutory *782 successor to former § 1356). Thaler alleges that the foreclosure of the Assessment Lien extinguished Household's security interest in the property, both as a matter of public policy and because Household had obtained its interest with constructive knowledge of the lien created by the CC & R's.
Household demurred to the first amended complaint and to each of the purported causes of action therein. Household also sought judicial notice of certain documents in the record of title, which provided in effect that the Assessment Lien, foreclosure, and sale to Thaler were governed by sections 1366 and 1367. In particular: (1) the Assessment Lien provided that notice of the assessment lien was given pursuant to the authority vested in the Homeowners by sections 1366 and 1367; (2) a notice of default and election to sell under homeowners association lien was recorded against the property in December, 1997, and provided that it was given "pursuant to Civil Code Sections 2924, 1366 and 1367" and the Assessment Lien; and (3) a notice of trustee's sale was recorded in April 1998 and provided that it was given pursuant to the Assessment Lien.
On July 29, 1999, the trial court granted Household's request for judicial notice and sustained Household's demurrer without leave to amend. Citing sections 1214, 1215, and 1367, the court concluded that Thaler's interest in the property was subject to Household's second deed of trust. This appeal followed.

II. DISCUSSION

Thaler contends that the demurrer to his first amended complaint should have been overruled.[4] Essentially, he argues that the CC & R's and public policy require us to ignore the plain language of section 1367, even though the documentation of Thaler's acquisition of the property specifically dictates that section 1367 would apply. We disagree with Thaler's position.

A. APPEALABILITY
An order sustaining a demurrer is usually not immediately appealable, because it is not on its face a final judgment. (Evans v. Dabney (1951) 37 Cal.2d 758, 759, 235 P.2d 604.) However, it may be treated as a judgment for purposes of appeal when, like a formal judgment, it disposes of the action and precludes further proceedings. (Daar v. Yellow Cab Co. (1967) 67 Cal.2d 695, 699, 63 Cal.Rptr. 724, 433 P.2d 732.) When a demurrer is sustained as to all causes of action, without leave to amend, the only step left to finally dispose of the action is the formality of an order or judgment of dismissal. In those situations, we may deem the order sustaining the demurrer to incorporate a judgment of dismissal, and review the order. (Hinman v. Department of Personnel Admin. (1985) 167 Cal.App.3d 516, 520, 213 Cal.Rptr. 410.) We do so here.

B. STANDARD OF REVIEW
An order sustaining a demurrer is erroneous if the allegations of the complaint state a cause of action under any legal theory. (Quelimane Co. v. Stewart Title Guaranty Co. (1998) 19 Cal.4th 26, 38-39, 77 Cal.Rptr.2d 709, 960 P.2d 513.) For purposes of assessing the sufficiency of the demurrer, we assume the truth of all well-pleaded facts. (Ibid.; Blank v. Kirwan (1985) 39 Cal.3d 311, 318, 216 Cal. Rptr. 718, 703 P.2d 58.) We also accept as true all facts that may be implied or inferred from those alleged. (Marshall v. Gibson, Dunn & Crutcher (1995) 37 Cal. App.4th 1397, 1403, 44 Cal.Rptr.2d 339.) In addition, relevant matters that are *783 properly the subject of judicial notice may be treated as having been pled. (Friedland v. City of Long Beach (1998) 62 Cal.App.4th 835, 842, 73 Cal.Rptr.2d 427; Code Civ. Proc., § 430.30, subd. (a).)[5]

C. PRIORITY OF HOUSEHOLD'S EARLIER-FILED DEED OF TRUST
California follows the "first in time, first in right" system of lien priorities. (§ 2897.) With respect to real property, a conveyance recorded first generally has priority over any later-recorded conveyance. (§ 1214.) A properly recorded conveyance of real property also serves as constructive notice of its contents to all subsequent purchasers and encumbrances. (§ 1213.) A "conveyance" within the meaning of sections 1213 and 1214 includes "every instrument in writing by which any estate or interest in real property is created, aliened, mortgaged, or incumbered, or by which the title to any real property may be affected, except wills." (§ 1215.) There is no dispute that the Homeowners' CC & R's, Household's second deed of trust, and the (Homeowners') Assessment Lien are conveyances under sections 1213 and 1214.
When Household recorded its second trust deed on the property in 1992, it had notice of the terms of the Homeowners' CC & R's, which was recorded in 1985. By their terms, the CC & R's created a present lien with power of sale to secure the payment of future homeowner association assessments. However, the CC & R's also provided that the property was part of a project subject to the provisions of the "California Condominium Act (Title VI, Part 4, [former] Sections 1350-1370, inclusive)." They further provided that enforcement of any lien resulting from an assessment would be controlled by former section 1356, as that section might thereafter be amended.[6]
At the time, section 1356 provided "[the assessment] shall be and become a lien upon the condominium assessed when the management body causes to be recorded with the county recorder of the county in which such condominium is located a notice of assessment.... [¶] Such lien shall be prior to all other liens recorded subsequent to the recordation of said notice of assessment except that the declaration of restrictions may provide for the subordination thereof to any other liens and encumbrances." (Italics added.) Thus, under former section 1356, the Assessment Lien was perfected upon the recording of a notice of assessment, and the notice of assessment would have priority over any later-recorded conveyances.
The Condominium Act (former § 1350 et seq.), including section 1356, was repealed in 1985 and replaced by the Davis-Stirling Common Interest Development Act (the Act). (Stats.1985, ch. 874, § 14, pp. 2774-2787; see Witkin, Summary of Cal. Law (9th ed. 1987) Real Property, § 314, p. 515.) The Act governs condominium projects and certain other common ownership arrangements. (§§ 1351, subd. (c), 1352.) Among other things, it grants to a homeowners association certain powers that facilitate the long-term operation of the development. (See Nahrstedt v. Lakeside Village Condominium Assn. (1994) 8 Cal.4th 361, 378-379, 33 Cal.Rptr.2d 63, 878 P.2d 1275.) For example, current section 1366 authorizes homeowners associations to levy assessments in order to perform *784 their obligations, such as the upkeep of common areas.
The substance of former section 1356 now appears in current section 1367 (Stats. 1985, ch. 874, § 14, pp. 2784-2785), which spells out the means by which an association may enforce recorded assessment liens through foreclosure. (Former § 1356 was repealed by Stats. 1985, ch. 874, § 13, p. 2773-2774.) Specifically, an assessment under section 1366 is a debt of the condominium owner (§ 1367, subd. (a)), and it constitutes a lien on the owner's interest upon the recording of a notice of delinquent assessment. (§ 1367, subd. (b).) After a 30-day period following the recording of the assessment lien, the lien may be enforced in any manner permitted by law, including by non-judicial foreclosure sale. (§ 1367, subd. (e).) And, critical to this appeal, the assessment lien has priority over Zater-recorded liens. (§ 1367, subd. (d).) Specifically, section 1367, subdivision (d) provides: "A lien created pursuant to subdivision (b) shall be prior to all other liens recorded subsequent to the notice of assessment, except that the declaration [i.e. the CC & R's] may provide for the subordination thereof to any other liens and encumbrances." Consequently, section 1367, subdivision (d), consistent with both its precursor section 1356 and the general priority statutes (§§ 1213, 1214), also follows the first in time, first in right concept of lien priorities.
Although section 1367 does not mention conveyances filed before the assessment lien, there is no reason to believe the Legislature intended to deviate from the system of first in time, first in right. Finding no conflict with other provisions of the Act or other statutes concerning the priority of liens, we need look no further than the plain, unambiguous language of section 1367 to determine its meaning. (Pepper v. Board of Directors (1958) 162 Cal.App.2d 1, 4, 327 P.2d 928.)
As applied here, Household's second deed of trust, which was recorded before the Assessment Lien, has priority over the Assessment Lien. (§§ 1214, 1367; see 7 Miller & Starr, Cal. Real Estate (2d ed.1990) § 20:43, p. 100 [lien of a prior recorded deed of trust has priority over a subsequent recorded assessment lien].) As a result, Thaler, who purchased pursuant to the Assessment Lien, bought the property subject to Household's deed of trust, as a matter of law. The trial court correctly sustained Thaler's demurrer without leave to amend.
Thaler takes two approaches in his attempt to evade the plain language of section 1367, neither of which has merit.

1. Thaler's Priority Argument

The CC & R's by their terms created a separate and present lien with power of sale to secure the payment of future assessments. Thaler seems to argue that, as a result, the lien for the enforcement of the Homeowners' assessment either sprang from the lien created by the CC & R's (rather than the Assessment Lien), or the Assessment Lien related back to (and derived priority from) the CC & R's. Thaler thus claims that Household took its interest subject to, and therefore subordinate to, the lien by which Thaler ultimately purchased the property. As alleged in the first amended complaint: "due to the `present lien' conferred by the CC & R's for the collection of assessments [of which Household had constructive knowledge when it assumed the second trust deed], Defendants' security interest in The Property was extinguished by the foreclosure of the Homeowners' assessment lien, giving him title to the subject property free of any claim or lien of Defendants."[7]
*785 Thaler's argument is undermined by the recorded documents appended to his first amended complaint and by the subject matter of Household's request for judicial notice. (See Frantz v. Blackwell (1987) 189 Cal.App.3d 91, 94, 234 Cal.Rptr. 178 [exhibits attached to complaint may be considered on demurrer].) The notice of default, notice of trustee's sale, and trustee's deed of sale each provided that the enforcement of the assessment, the foreclosure sale, and the conveyance of title all occurred pursuant to the Assessment Lien, not any lien created at the time of the recording of the CC & R's. Furthermore, a number of those documentsas well as the CC & R's themselvesprovide that proceedings to enforce the lien are governed by former section 1356, as it might thereafter be amended (i.e. § 1367). Former section 1356 and current section 1367 state that the lien to be enforced is one that is perfected upon the recording of a notice of delinquent assessmenti.e., the Assessment Lien.
On an alternative theory, Thaler points out that the CC & R's provided that any assessment lien would be subordinate to a subsequently recorded first deed of trust. From this language, he seems to argue that the CC & R's implicitly mandated that the Assessment lien would not be subordinate to any second deed of trust, even if the second deed of trust was recorded before the Assessment lien. His argument overlooks the fact that nothing in the CC & R's suggests such a result. Its provisions do not affect the general principle that earner-recorded trust deeds (whether primary or secondary) have priority over later-recorded assessment liens. (See Miller & Starr, Cal. Real Estate, supra, § 20:43, p. 100, fn. 7; see also Mountain Home Properties v. Pine Mountain Lake Assn. (1982) 135 Cal. App.3d 959, 968, 185 Cal.Rptr. 623 [covenants running with the land, including those contained in CC & R's, are to be strictly construed].) And even if the CC & R's could be given such an interpretation, they would be in direct conflict with the Act, which plainly does provide for the priority of the earlier recorded conveyances. In the event of a conflict between CC & R's and the Act, the Act prevails as a matter of law. (14859 Moorpark Homeowner's Assn. v. VRT Corp. (1998) 63 Cal. App.4th 1396, 1406-1407, 74 Cal.Rptr.2d 712.) Indeed, the CC & R's themselves contemplate that its provisions would be superseded by any conflicting governing law.

2. Thaler's Policy Argument

Thaler claims we should read section 1367 to mean something other than what it says. He argues, essentially, that a literal application of section 1367 would defeat the Act's purpose of facilitating the operation of homeowners' associations. He argues, if the lien for collection of homeowners' dues is junior to any earlier-recorded lien, then the title conveyed to a purchaser at a foreclosure sale would be subject to those encumbrances. And, if a homeowners association purchases the foreclosed property, it could be required to pay those debts in order to preserve its interest. Thaler contends it is contrary to the Act to require homeowners associations to assume or pay secondary mortgage or deed of trust financing after foreclosing under an assessment lien.
Thaler's argument is unavailing. In the first place, his first amended complaint contained no allegation that homeowners associations are usually the ones that purchase property at the foreclosure sale. In this case, of course, it was an individual (Thaler) who purchased the property, and the homeowners association was in fact compensated for the unpaid assessment. In any event, a homeowners association may always take into consideration its potential liability in deciding whether to foreclose and/or purchase the property. And, to the extent the homeowners' association, or its constituent members, may face some disadvantage by this interpretation, the following analysis from a respected treatise *786 on real estate law is brought to mind: "The burden on the remaining homeowners and the association is no different from the burden imposed on any creditor. Every creditor suffers the risk that a debtor may defeat collection of the obligation by over-encumbering his assets. This burden is secondary to the need of property owners to utilize their assets for financing purposes [and secondary financing will be discouraged if lenders believe that their deeds of trust will be subordinated to future assessment liens]." (Miller & Starr, supra, at p. 100, fn. 7.)
More importantly, even if Thaler's concerns about the fate of homeowners associations had merit, at best he raises a matter for the Legislature, not the courts. Respondents' interpretation of section 1367, adopted by the trial court, is not so absurd that it compels us to turn aside from the plain and unambiguous language of the statute. To the contrary, the interpretation is entirely consistent with the first in time, first in right policy that has governed real property conveyances for decades, as well as the statutes codifying that sound policy. If the Legislature had intended to carve out an exception for homeowners assessments, it could have and would have expressly stated so in its enactment of section 1367.
Finally, Thaler contends that a secondary mortgage should always be junior to an assessment lien, because the secondary mortgage holder benefits from the association's performance of its obligations, which are funded by the assessment. As between two innocent parties, he argues, it is easier for the secondary lender to protect itself against the risk that the unit owner will default on his homeowners assessments, than for the homeowners association to protect itself from the risk of the unit owner's default on a secondary mortgage. Further, it is argued, the burden on a secondary lender to pay the assessment is less than the burden placed on the association to pay the second mortgage. Given the plain and unambiguous statutory law governing this issue, however, none of these arguments justify the subordination of a second trust deed to a later-recorded assessment lien.
The trial court properly sustained Household's demurrer without leave to amend.
The order of the trial court is affirmed.

III. DISPOSTION

The order of the trial court is affirmed.
JONES, P.J., and KRAMER, J.[*], concur.
NOTES
[1]  Unless otherwise indicated, all further section references are to the Civil Code.
[2]  According to the first amended complaint, Household is successor-in-interest to respondent Transamerica Financial Services, who was the original beneficiary of the second deed of trust. Respondents Household Recovery Services and HFC are allegedly wholly owned subsidiaries of Household.
[3]  Also recorded against the property was a lien for real property taxes in the amount of approximately $1,600 and a first deed of trust in favor of Home Savings of America, securing approximately $83,000. Thaler did not sue the taxing authority or Home Savings of America and seeks no relief from them.
[4]  Thaler submits that the demurrer to his original complaint should have been overruled as well. However, his first amended complaint superseded his original pleading, and the latter is therefore not before us. Thaler does not assert he could allege any new or additional material facts, and thus we are not called upon to determine whether leave to amend should have been granted.
[5]  On appeal from a demurrer/dismissal of a declaratory relief action, we may apply an abuse of discretion standard to determine whether declaratory relief is a proper remedy, unless, as here, the facts are not in dispute and the issue may be determined as a matter of law. (C.J.L. Construction, Inc., v. Universal Plumbing (1993) 18 Cal.App.4th 376, 383, 22 Cal.Rptr.2d 360.)
[6]  The CC & R's read: "Each of the Unit Owners does hereby appoint the Association, as trustee, to enforce any lien created pursuant to this Declaration and to foreclose such lien by private power of sale as provided in Division III, Part 4, Title XIV, Chapter 2, Article I of the Civil Code of the State of California and Civil Code Section 1356, as such statutes may be revised, amended or altered from time to time...."
[7]  Similarly, Thaler contends that the subject assessment was levied under the authority of the CC & R's, rather than section 1366, and that it therefore should not be governed by section 1367. We see no such allegation in the first amended complaint, and we would reach the same result even if there were such an allegation.
[*]   Judge of the San Francisco Superior Court assigned by the Chief Justice pursuant to article VI, section 6 of the California Constitution.
