This is a consolidated appeal taken by appellant-plaintiff below, Debra A. Eiler, from the orders of the trial court which dismissed with prejudice all counts of her complaint against appellees-defendants below, Paul N. Howard Company, Affholder, Incorporated and Kern-Affholder, Incorporated. We hold that the trial court erred in dismissing these portions of Eiler's complaint and, therefore, reverse.
In November of 1987, Debra Eiler, as guardian for her ex-husband Richard Eiler, instituted this action for damages by filing a complaint against several defendants including the Paul N. Howard Company, Affholder, Incorporated and Kern-Affholder, Incorporated. In her complaint Eiler averred that the defendants were liable for personal injuries sustained by her ex-husband as a result of an accident which occurred while he was at work. In response to Eiler's complaint, appellee Paul N. Howard Company filed a motion to dismiss the complaint and shortly thereafter appellees Kern-Affholder, Incorporated and Affholder, Incorporated filed a separate motion to dismiss. Appellees all claimed that the complaint should be dismissed as to them because appellees were entitled to immunity from suit pursuant to section 440.11 of the Workers' Compensation Act. Following a hearing, the trial court granted appellees' motions to dismiss.
On appeal Eiler contends that it was error for the trial court to dismiss her complaint based upon the finding that the Workers' Compensation Act provides appellees with immunity from suit, asserting that the defense of workers' compensation immunity is an affirmative defense which cannot be raised on a motion to dismiss. It is settled law that the function of a motion to dismiss a complaint is to raise a question of law as to the sufficiency of the facts alleged to state a cause of action and that a court may not properly go beyond the four corners of the complaint in testing the legal sufficiency of the allegations set forth therein. Reed v. Sampson, 349 So.2d 684 (Fla. 4th DCA 1977). It is equally well settled that the exclusivity provision set forth in section 440.11 of the Workers' Compensation Act is an affirmative defense which cannot be raised by a motion to dismiss unless the allegations of a prior pleading in the case demonstrate the existence of such a defense. Moucha v. Burger King Corporation, 450 So.2d 335 (Fla. 5th DCA 1984). See also Walker v. ITD Industries, Inc., 437 So.2d 230 (Fla. 2d DCA 1983).
Here, Eiler's complaint alleges a cause of action against appellees in negligence. The complaint does not contain any allegations concerning the Workers' Compensation Act. Thus, in granting appellees' motions
REVERSED and REMANDED.
DAUKSCH and GOSHORN, JJ., concur.