http://d.puremagic.com/issues/show_bug.cgi?id=633
Summary: Enum promotion rules are not specified
Product: D
Version: 0.175
Platform: All
URL: http://www.digitalmars.com/d/type.html
OS/Version: All
Status: NEW
Keywords: spec
Severity: normal
Priority: P2
Component: www.digitalmars.com
AssignedTo: bugzilla@digitalmars.com
ReportedBy: smjg@iname.com
OtherBugsDependingO 511
nThis:
The spec gives promotion rules for when typedef'd values are combined by arithmetical or other operations. As it happens, the spec needs to be clearer - see issue 632.
However, it fails to give enums the same treatment. So the behaviour of these types when combined is undefined.
We need to incorporate information on how these are treated into the spec. My opinion on this is the same as for typedefs - that the lowest common denominator principle is the best.
For further commentary and rationale, please see http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=44821
Whatever we do, we must also make sure it's unambiguous what happens in the cases of enums of typedefs or vice versa.
--
|