orally raised the defense that plaintiff’s sole recovery was under the Workmen’s Compensation Act and, when this occurred, plaintiff, to protect himself, filed a claim for compensation benefits against the employer. Still later, on leave granted, defendant formally pleaded as an affirmative defense that the accident on the employer’s premises had arisen out of and in the course of the employment of both men; that plaintiff had filed a claim against the employer for compensation benefits, which claim had been settled for $9,469.71 with the approval of the Illinois Industrial Commission; and that under the law of Illinois, (presumably referring to section 5(a),) plaintiff had no common-law action against defendant but was limited to his remedy under the Workmen’s Compensation Act.
Answering the affirmative defense, plaintiff admitted that the parties and their employer were operating under the act, but denied that the accident had arisen out of and in the course of the employment of either man and alleged that if section 5(a) was to be construed as barring his common-law action, then its application would deny him due process and equal protection of the law. Additionally, and among other things, the answer alleged that defendant had carried a $25,000 public liability policy on his car; that he, the plaintiff, had a claim against defendant under the terms of the policy; and that to permit section 5(a) to stand as a bar to his common-law action would cause the section to violate the provisions of the State and Federal constitutions which prohibit legislation impairing the obligation of contract. See: Const, of Ill. art. II, sec. 14; Const, of the U.S., art. I, sec. 10.
On the basis of such pleadings, and after an appropriate motion and hearing, the trial court entered judgment for defendant. This appeal by plaintiff has followed and he has renewed the constitutional claims made below.
Plaintiff concedes that the regulation of the employer-employee relationship may be validly accomplished under