[Issue 4940] ICE(symbol.c): Accessing tuple-typed field of struct literal with user-defined constructor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 29 22:14:01 PDT 2011


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


yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies at gmail.com


--- Comment #2 from yebblies <yebblies at gmail.com> 2011-08-30 15:13:59 EST ---
Test case from 6530:

struct S {
    int a, b, c;
}

struct HasPostblit {
    this(this) {}  // Bug goes away without this.
}

auto toRandomAccessTuple(T...)(T input, HasPostblit hasPostblit) {
    return S(1, 2, 3);
}

void doStuff(T...)(T args) {
    HasPostblit hasPostblit;

    // Bug goes away without the .tupleof.
    auto foo = toRandomAccessTuple(args, hasPostblit).tupleof;
}

void main() {
    doStuff(1, 2, 3);
}

-- 
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