Summary: Enum structs without specified values
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Don <> 2012-02-09 14:00:35 PST ---
Bug 4423 considers the case of enum structs where all values are explicitly
specified; it requires a particular opCmp signature.

The case of enum structs when values are NOT specified is even more

struct Foo { int x; }
enum Bar : Foo { a, b }

For this to work, it is required that Foo supports:
* implicit cast from 0 to Foo.
* a .max property
* + 1
* and opCmp of the correct signature.

I think this is a useless feature, and should simply be dropped.

Currently, the test case gives some unhelpful error messages, containing
__error and no line number:

crash.d(3): Error: cannot implicitly convert expression (0) of type int to
Error: no property 'max' for type 'Foo6699'
crash.d(3): Error: Integer constant expression expected instead of (__error) ==

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to