[Issue 8899] Erroneous delegate usage and map template

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8899

Andrei Alexandrescu  changed:

   What|Removed |Added

Version|unspecified |D2

--


[Issue 8899] Erroneous delegate usage and map template

2013-11-21 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=8899


Kenji Hara  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME


--- Comment #3 from Kenji Hara  2013-11-21 23:02:59 PST ---
(In reply to comment #0)
> Probably the bug comes from how dmd arranges code generation. If main.d
> includes std.string (or other heavily templated module) it is forced to
> instantiate templates when it generates code for main module even if they are
> irrelevant. However, because main imports test, it instantiates map template
> and generates delegate before code of test function is generated. 
>
[snip]
> 
> So, probably the problem is in generating delegate before generating function
> which local variables are accessed by delegate. 

Import graph dependent lambda code generation bug is mostly fixed in 2.064 (eg.
bug 10857). And with 2.064, the OP code (main.d + test.d + -version=bug) does
not cause any runtime problem. So the issue seems to be fixed already.

> This issue summarizes information from following issues:
> - issue 8514 : delegate and map leads to segfault, importing standard module 
> affects
> behavior
> - issue 8854 : as described above 
> - issue 8832 : similar code which uses map and delegate has different and 
> incorrect
> behavior
> - issue 5064 (???): program crashes when using map and delegate
> - issue 7978 : map, take and iota functions with delegates

All of listed issues are fixed right now.

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


[Issue 8899] Erroneous delegate usage and map template

2012-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8899



--- Comment #2 from Maxim Fomin  2012-11-10 11:56:00 PST 
---
Issue 8994 shows similar problem.

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


[Issue 8899] Erroneous delegate usage and map template

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8899



--- Comment #1 from Maxim Fomin  2012-11-02 05:04:41 PDT 
---
- issue 8934 shows same problem

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