Thread overview
[Issue 8802] New: Problem with enums of void*
Nov 27, 2012
Andrej Mitrovic
Nov 28, 2012
Andrej Mitrovic
Nov 28, 2012
Rainer Schuetze
Dec 03, 2012
Kenji Hara
October 11, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8802

           Summary: Problem with enums of void*
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: bearophile_hugs@eml.cc


--- Comment #0 from bearophile_hugs@eml.cc 2012-10-11 10:09:32 PDT ---
Problem found by Lubos Pintes: http://forum.dlang.org/thread/k5422g$1co5$1@digitalmars.com



enum Foo : void* {
    a = null
}
void main() {
    auto f = Foo.a;
}



DMD 2.061alpha gives:

temp.d(5): Error: no property 'a' for type 'void'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 27, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8802


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |andrej.mitrovich@gmail.com
         AssignedTo|nobody@puremagic.com        |andrej.mitrovich@gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-11-27 15:58:45 PST ---
Note that there's another separate and unrelated bug here, you can't compile this with -g.

D:\dev\code\d_code>dmd -g test.d
test.d(4): Error: Integer constant expression expected instead of null
test.d(4): Error: Integer constant expression expected instead of null

I'm not sure if this is filed yet.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 28, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8802



--- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-11-27 16:26:32 PST ---
https://github.com/D-Programming-Language/dmd/pull/1330

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 28, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8802



--- Comment #3 from bearophile_hugs@eml.cc 2012-11-27 16:52:25 PST ---
(In reply to comment #1)

> I'm not sure if this is filed yet.

I think that's already in Bugzilla (not filed by me).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 28, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8802


Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario@gmx.de


--- Comment #4 from Rainer Schuetze <r.sagitario@gmx.de> 2012-11-27 22:33:14 PST ---
(In reply to comment #1)
> Note that there's another separate and unrelated bug here, you can't compile this with -g.
> 
> D:\dev\code\d_code>dmd -g test.d
> test.d(4): Error: Integer constant expression expected instead of null
> test.d(4): Error: Integer constant expression expected instead of null
> 
> I'm not sure if this is filed yet.

This is issue 5168.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 03, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8802



--- Comment #5 from github-bugzilla@puremagic.com 2012-12-02 17:20:19 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/bfd3af86dca2a4a1c0efb533a874812ca33ac515 Fix Issue 8802 - proplem with enum of void*

https://github.com/D-Programming-Language/dmd/commit/c377a6451302e3bfd8cf74e72b34ca64642fb45a Merge pull request #1330 from AndrejMitrovic/Fix8802

Issue 8802 - Lookup problem with void* enum base type

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 03, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8802


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------