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.
The syntax for enum ranges only allows for literal constants, not parameters. This is because the enum identifier names get created at parse time, not at a later stage when parameters can get overridden at elaboration stage.
While I understand the reasoning of your explanation from the LRM there is no mention about not allowing parameters, maybe it is implied, but it is not clear for the general audience like myself :)