[Issue 21905] case of infinite loop when combining IFTI, `ref`, and `alias this` on static instance

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 8 00:06:11 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21905

Basile-z <b2.temp at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=21543

--- Comment #2 from Basile-z <b2.temp at gmx.com> ---
the loop is fixed with the most recent versions but it seems that valid code
get rejected:

---
struct Conv
{
    StaticIterable b;
    alias b this;
}

struct StaticIterable
{
    static Conv b;
    alias b this;
}

void each(ref StaticIterable r)
{
    return ;
}

void main()
{
    StaticIterable s;
    each(s);
}
---

--


More information about the Digitalmars-d-bugs mailing list