Thread overview
[Issue 6494] New: alias to const type in struct results in strange error
Aug 14, 2011
Trass3r
Aug 14, 2011
Kenji Hara
Oct 26, 2011
Trass3r
August 14, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6494

           Summary: alias to const type in struct results in strange error
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic, rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: mrmocool@gmx.de


--- Comment #0 from Trass3r <mrmocool@gmx.de> 2011-08-14 11:54:17 PDT ---
struct Blub
{
    alias const(void*) T;

    ~this() {}
    invariant() {}
}

$ dmd -c wrapper.d
DMD v2.054 DEBUG
Error: __result = this is not mutable
Error: __result = this is not an lvalue

Somehwat related to bug 5690 but this one doesn't show an error location and there is no "real" const member, just an alias.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 14, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6494


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |k.hara.pg@gmail.com


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-08-14 12:13:08 PDT ---
I think this is bug 3273, and it is already fixed in master. Your sample code pass compile with trunk dmd.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 26, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6494


Trass3r <mrmocool@gmx.de> 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: -------