On Monday, 15 July 2013 at 10:17:08 UTC, JS wrote:
On Monday, 15 July 2013 at 08:20:20 UTC, Namespace wrote:Maybe this way?---- final abstract class Colors { enum Red { RedOrange } enum Green { GreenBlue} enum Blue { BlueYellow } } void main() { Colors.Red foo = Colors.Red.RedOrange; assert(foo >= Colors.Red.min && foo <= Colors.Red.max); } ----but RedOrange and GreenBlue have the same value!
Also, Colors.Red is not a value!