[Issue 8506] segault when using map with template delegate

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 4 10:22:28 PDT 2012


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



--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2012-08-04 10:22:27 PDT ---
(In reply to comment #0)
> import std.algorithm;
> import std.array;
> 
> class A {
>     B[] b;
> }
> 
> class B {}
> 
> void main() {
>     A a;
> 
>     a.b = a.b.map!(b => b)().array();
> }
> 
> This code segfault in invariant._d_invariant with dmd 2.060 . This ork fine
> with (B b) { return b; } as delegate.

The variable a is class, and initialized with null, then this code never works.

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