In reply to a_stod:
All of commercial simulators in EDAPlayGround got an error.
There is no comments in LRM but I think SIZE can not change the value at elaborate and simulation stage.
Parameter value can change at elaborate stage by using “-defparam” or other option of simulators.
It works if it set the value by using `define.
`define SIZE 5
typedef enum { add, sub[`SIZE] } e_t;
I hope Dave will explain cause of the error in detail.