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

           Summary: dmd generate bug that segfault in very weird
                    situation.
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nob...@puremagic.com
        ReportedBy: deadal...@gmail.com


--- Comment #0 from deadalnix <deadal...@gmail.com> 2012-08-06 13:40:13 PDT ---
A sample code :

module a.main;

class A {
    A[] a;
}

class B {
    A foo(A a) {
        return a;
    }
}

import std.algorithm;
import std.array;

auto bar(A a) {
    auto b = new B;
a.a.map!(s => b.foo(s)).array;
}

void main() {
    auto a1 = new A;
    auto a2 = new A;

    a1.a = [a2];

    bar(a1);
}

module b.b;

import std.string;

Linking both is important, as well as importing std.string . The usage of map
require the delegate to be templated one.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to