switch to lazy evaluation of enum properties
Merge pull request #2560 from WalterBright/lazy-enum-props

switch to lazy evaluation of enum properties