As the code below shows, dmd doesn't compile well when a lambda function is nested another lambda(only fails if the result is used somehow later). test case: =========== module foo; import std.algorithm, std.range, std.array; auto bar() { auto data = [5, 6, 7, 8], test = map!( (x) => reduce!"a+b"(data[$-x..$]) )([1, 3]); return array(test); // or "wrilteln(test);". if just "return test;" it works. } ========== When compile this module without -inline, it works. Otherwise it will be failed: foo.d(7): Error: function foo.bar is a nested function and cannot be accessed from std.array.array!(MapResult!(__lambda2,int[])).array
Same test (but obfuscated a bit) as in Issue 4841 description. *** This issue has been marked as a duplicate of issue 4841 ***
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル