Thread overview
[Issue 7123] static assert(is(typeof(toDelegate(&main)))) is false
Dec 17, 2011
Kenji Hara
Dec 17, 2011
Kenji Hara
Dec 19, 2011
Walter Bright
December 17, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7123



--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-12-17 04:12:01 PST ---
Reduced test case:

private struct DelegateFaker(F)
{
    template GeneratingPolicy() {}
    enum WITH_BASE_CLASS = __traits(hasMember, GeneratingPolicy!(), "x");
}
auto toDelegate(F)(F fp)
{
    alias DelegateFaker!F Faker;
}
void main()
{
    version(pass)
    {
        pragma(msg, typeof(toDelegate(&main)));
        static assert(is(typeof(toDelegate(&main))));
    }
    else
    {
        static assert(is(typeof(toDelegate(&main))));
    }
}

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch, wrong-code
           Platform|Other                       |All
         OS/Version|Windows                     |All


--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2011-12-17 04:46:16 PST ---
https://github.com/D-Programming-Language/dmd/pull/566

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


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> 2011-12-18 20:22:23 PST ---
https://github.com/D-Programming-Language/dmd/commit/9642adfe1705a4db07cb374bbf363fdc5f7af859

https://github.com/D-Programming-Language/dmd/commit/c0c645ad89169ff6478ee73c63b2181e081f030f

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