class, interface, enum, or record expected
At times of this error, like most websites say, Check Braces place,
place of methods and
mainly check if the spelling of class or enum is correct or no, for me it was this,
it has to be lowercase.
Hope it is solved.