You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code cannot be compiled.
I checked it by using DMD trunk (v2.068-devel-407dac3) in Mac OSX.
---
import std.algorithm.iteration;
void main()
{
auto n = 3;
auto s = [1,2,3].chunkBy!(a => a+n); /// Error: function sample.main.ChunkByImpl!(__lambda1, int[]).ChunkByImpl.__lambda12 cannot access frame of function D main
}
---
The text was updated successfully, but these errors were encountered:
@jamesragray created dlang/phobos pull request #7625 "Issue 14909: Provided a fix for the forward range version of chunkBy …" mentioning this issue:
- Issue 14909: Provided a fix for the forward range version of chunkBy so that it can accept predicates refernce variables in the calling function
https://github.com/dlang/phobos/pull/7625
dlang/phobos pull request #7625 "Issue 14909: Provided a fix for the forward range version of chunkBy …" was merged into master:
- 2ed6952a719ce610bc3a513d67b602163f196ff9 by James Gray:
Issue 14909: Provided a fix for the forward range version of chunkBy so that it can accept predicates refernce variables in the calling function
https://github.com/dlang/phobos/pull/7625
Tomoya Tanjo (@tom-tan) reported this on 2015-08-12T07:49:50Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=14909
CC List
Description
The text was updated successfully, but these errors were encountered: