[Issue 6932] Weird forward reference error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 12 07:40:17 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=6932


hsteoh at quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |hsteoh at quickfur.ath.cx
         Resolution|                            |WORKSFORME


--- Comment #1 from hsteoh at quickfur.ath.cx 2013-09-12 07:40:16 PDT ---
Tested on dmd git HEAD (6a90c4df): I couldn't compile the code snippet due to
unrelated errors, so I inserted dummy definitions of cl_errcode and added a
return statement to dontremovethis(). Here is the code I tested:

----
enum cl_errcode {A}

package mixin template CLWrapper(T, alias g)
{
    package alias T CTypedontremovethis;
}

package struct CLObjectCollection(T)
{
    this(T.CTypedontremovethis)
    {
    }
}

alias CLObjectCollection!CLDevice CLDevices;

cl_errcode dontremovethis(
) { return cl_errcode.A; }


struct CLDevice
{
    mixin CLWrapper!(int, dontremovethis);
}
----

DMD git HEAD seems to be capable of compiling this correctly now, so I'm
resolving this bug. Please reopen and post failing code if it still doesn't
work for you. Thanks!

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


More information about the Digitalmars-d-bugs mailing list