[Issue 6774] Assertion failure: '0' on line 1117 in file 'glue.c'
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Oct  6 13:58:53 PDT 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=6774
Kenji Hara <k.hara.pg at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2011-10-06 13:58:09 PDT ---
Remove dependency to std.traits.
----
private template staticLength(tuple...)
{
    enum size_t staticLength = tuple.length;
}
template ReturnType(func...)
    if (staticLength!(func) == 1)    // (a)
{
    static if (is(typeof(func) R == return))
        alias R ReturnType;
    else
        static assert(0, "argument has no return type");
}
struct PointImpl(T)
{
    @property auto test()
    {
        return PointImpl!int();
    }
}
struct Wrapper(T)
{
    T payload;
    auto test()
    {
        //pragma(msg, ReturnType!(T.test));
        //static if (is(ReturnType!(T.test))) { }
        static if (is(ReturnType!(T.test) == void)) { }
        return payload.test;
    }
}
Wrapper!(PointImpl!int) point;
void main()
{
    auto x = point.test;
}
----
A gagged forward reference error at (a) causes this problem.
-- 
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