April 02, 2014 [Issue 12506] New: Wrongly private lambda to define global immutable array | ||||
---|---|---|---|---|
| ||||
https://d.puremagic.com/issues/show_bug.cgi?id=12506 Summary: Wrongly private lambda to define global immutable array Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2014-04-02 04:33:14 PDT --- A problem found by ketmar: import std.range: iota; import std.algorithm: map; import std.array: array; private bool[9] a = 9.iota.map!(i => true).array; // OK private immutable bool[9] b = 9.iota.map!(i => true).array; // error void main() {} DMD 2.066alpha gives: ...\dmd2\src\phobos\std\algorithm.d(512,19): Error: function test.__lambda8 is not accessible from module algorithm ...\dmd2\src\phobos\std\array.d(29,5): Error: template instance std.traits.isIterable!(MapResult!(__lambda8, Result)) error instantiating test.d(5,53): instantiated from here: array!(MapResult!(__lambda8, Result)) -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 03, 2014 [Issue 12506] Wrongly private lambda to define global immutable array | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | https://d.puremagic.com/issues/show_bug.cgi?id=12506 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull Platform|x86 |All OS/Version|Windows |All --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2014-04-03 00:21:59 PDT --- https://github.com/D-Programming-Language/dmd/pull/3419 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation