[Issue 11920] Rvalue aggregate contains lvalues

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue May 20 14:22:58 PDT 2014


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

--- Comment #2 from monarchdodra at gmail.com ---
I re-encountered this problem with this new usecase. That code don't make no
sense to me:

//----
struct S
{
    int i;
}
enum a = [1, 2, 3];
enum b = S(1);

void foo(ref int b)
{
    b = 5;
}

void main()
{
    foo(a[1]);
    foo(b.i);
}
//----

--


More information about the Digitalmars-d-bugs mailing list