http://d.puremagic.com/issues/show_bug.cgi?id=8832
Walter Bright <bugzi...@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzi...@digitalmars.com --- Comment #4 from Walter Bright <bugzi...@digitalmars.com> 2012-12-29 00:41:00 PST --- A clearer test case: import std.algorithm; import std.range; import std.stdio; auto boo() { auto C = [2]; auto bar(int) { return C; } return [1,1].map!(bar).joiner; } void main() { writeln(boo().take(12)); } The problem is that joiner!(MapResult!(bar,int[])) is not recognized as a 'local' template instantiation, even though MapResult!(bar,int[]) is marked as local. Hence, boo() is not marked as needing a closure (case (4) in FuncDeclaration::needsClosure()). The fix listed for Issue 8863 correctly fixes this one. But there are other problems with that fix, as listed in 8863. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------