
23 Wn. App. 398 (1979)
595 P.2d 952
JOHN F. RODRIGUEZ, ET AL, Plaintiffs,
v.
JOHN E. NIEMEYER, Appellant, T.J. LUND, Respondent.
No. 2884-3.
The Court of Appeals of Washington, Division Three.
May 22, 1979.
Williams & Golden and Eugene T. Golden, for appellant.
Jones & Esser and Madison R. Jones, for respondent.
ROE, J.
This case is presented upon an agreed statement of facts: John Niemeyer purchased an older home, *399 planning to move it to a new location. In 1968, he contracted with T.J. Lund, d/b/a T.J. Lund & Son, Contractors, for the construction of a basement on which the house would rest. Although Lund made some minor repairs to the basement walls in 1969, the excavation and construction of the basement were completed in 1968. Niemeyer sold the home to John and Monica Rodriguez in 1971. When the foundation began to deteriorate and crack in 1976, plaintiffs Rodriguez sued Niemeyer for breach of the express and implied warranties that the home was fit for habitation and the foundation stable. Alleging that he had relied on Lund's skill and experience in constructing the basement, Niemeyer (third-party plaintiff) sued T.J. Lund for negligence and breach of express and implied warranties. Lund moved for summary judgment, contending that the suit was barred by the 6-year limitations period in RCW 4.16.300 et seq. Following the entry of an order granting the motion and dismissing Lund from the suit, Niemeyer appealed.
[1] A summary judgment is only appropriate when there is no genuine issue as to any material fact and the moving party is entitled to judgment as a matter of law. Sarruf v. Miller, 90 Wn.2d 880, 586 P.2d 466 (1978). Niemeyer does not contend that there is a genuine issue of fact in this case; rather, he argues that the trial court erred in failing to follow Ruth v. Dight, 75 Wn.2d 660, 453 P.2d 631 (1969), and apply the "discovery rule" to the statute of limitation.
Generally, a limitation statute operates to bar an action unless the aggrieved party commences suit within a specified time after the legal injury. The "discovery rule" accommodates the interests of the aggrieved party who does not know of the wrong until the statutory period has expired: the limitation period then begins to run when the party discovers, or in the exercise of reasonable diligence, should have discovered the injury. In Ruth v. Dight, supra, the Supreme Court adopted the discovery rule for medical malpractice cases, recognizing that many patients would not otherwise detect medical negligence until after suit was barred.
*400 Since Ruth v. Dight, supra, the discovery rule has been judicially adopted and applied to many other professions: Peters v. Simmons, 87 Wn.2d 400, 552 P.2d 1053 (1976) (attorneys); Gazija v. Nicholas Jerns Co., 86 Wn.2d 215, 543 P.2d 338 (1975) (negligent cancellation of insurance policy); Hunter v. Knight, Vale & Gregory, 18 Wn. App. 640, 571 P.2d 212 (1977) (accountants); Hermann v. Merrill Lynch, Pierce, Fenner & Smith, Inc., 17 Wn. App. 626, 564 P.2d 817 (1977) (stockbrokers); and Kundahl v. Barnett, 5 Wn. App. 227, 486 P.2d 1164 (1971) (surveyors).
Niemeyer contends that the trial court was compelled to follow Ruth and its progeny, and apply the discovery rule to the instant case. According to this argument, the statute of limitation began to run on the claim against Lund when the breach of warranty was discovered in 1976, and not when the construction work was substantially completed in 1968, 8 years earlier. Therefore, he argues that his suit against Lund was timely and the order dismissing Lund from the suit was error.
Niemeyer's reliance on Ruth is inappropriate: that case involved RCW 4.16.080(2), the statute of limitation for general tort actions. A specific statute governing medical malpractice was not at issue.[1] Similarly, in Gazija v. Nicholas Jerns Co., supra, the discovery rule was judicially engrafted onto RCW 4.16.080(2) for claims against insurance agents because the legislature had not enacted a specific statute; however, the court there acknowledged:
While important policy reasons support the accrual at discovery rule, we also recognize it may be desirable to place some outer limit upon the delayed accrual of actions in order to avoid an undue burden on potential defendants. The legislature may wish to enact a reasonable absolute limitation on actions like those in this case as it has in other contexts. See RCW 4.16.310 [contractors], 4.16.350 ...
Gazija v. Nicholas Jerns Co., supra at 222 n. 2.
*401 [2, 3] The creation of limitation periods is primarily a legislative function, and the legislature has the constitutional power to enact a clear line of demarcation to fix a precise time beyond which no remedy will be available. Ruth v. Dight, supra. In this case, that power has been exercised. RCW 4.16.310, enacted in 1967, provides:
All claims or causes of action as set forth in RCW 4.16.300[[2]] shall accrue, and the applicable statute of limitation shall begin to run only during the period within six years after substantial completion of construction, or during the period within six years after the termination of the services enumerated in RCW 4.16.300, whichever is later. The phrase "substantial completion of construction" shall mean the state of completion reached when an improvement upon real property may be used or occupied for its intended use. Any cause of action which has not accrued within six years after such substantial completion of construction, or within six years after such termination of services, whichever is later, shall be barred: Provided, That this limitation shall not be asserted as a defense by any owner, tenant or other person in possession and control of the improvement at the time such cause of action accrues.
The statute has a broad scope barring all causes of action that do not accrue within 6 years after substantial completion or termination of any of the specified services, Pinneo v. Stevens Pass, Inc., 14 Wn. App. 848, 545 P.2d 1207 (1976), whether the damage was or could have been discovered within that period. This court cannot constitutionally ignore such a clear mandate from the legislature.
*402 In this case, Lund constructed Niemeyer's basement in 1968. The foundation allegedly disintegrated in 1976, and suit was brought in 1976. Since this action accrued more than 6 years after the work was substantially completed, Niemeyer's claim based on that work was barred. The trial court correctly applied RCW 4.16.310, and the order granting summary judgment in favor of Lund was not error.
Judgment affirmed.
GREEN, C.J., and MUNSON, J., concur.
NOTES
[1]  Since the Ruth decision, RCW 4.16.080(2) has been superseded by RCW 4.16.350 for medical malpractice cases.
[2]  RCW 4.16.300 provides:

"Actions or claims arising from construction, alteration, repair, design, planning, survey, engineering, etc., of improvements upon real property. RCW 4.16.300 through 4.16.320 shall apply to all claims or causes of action of any kind against any person, arising from such person having constructed, altered or repaired any improvement upon real property, or having performed or furnished any design, planning, surveying, architectural or construction or engineering services, or supervision or observation of construction, or administration of construction contracts for any construction, alteration or repair of any improvement upon real property."
