[Issue 8863] struct passed to template: cannot access frame pointer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 14 01:08:03 PST 2012


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



--- Comment #6 from Kenji Hara <k.hara.pg at gmail.com> 2012-11-14 01:08:01 PST ---
Furthermore, the original code had generated incorrect code silently. This
slight complicated code might cause access violation in 2.060 or earlier.

auto fun(T)(out T ret) {
    // ret is incorrectly initialized,
    // and has null context pointer
    ret.f();    // Access Violation
}
void main() {
    int val;
    struct A {
        auto f(){ val = 1; }
    }
    A a;
    fun!A(a);
}

So, I'd like to argue that this issues should be an 'accepts-invalid' bug
rather than a regression.

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