Bug 9060 – std.range.chain and std.range.zip cannot get frame pointer

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-22T16:00:00Z
Last change time
2012-12-17T21:21:11Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-11-22T16:00:27Z
import std.algorithm: map; import std.range: chain, zip; void main() { auto r = map!(x => 0)([1]); chain(r, r); zip(r, r); } DMD 2.061alpha gives: ...\dmd2\src\phobos\std\range.d(1988): Error: function std.range.chain!(MapResult!(__lambda2, int[]),MapResult!(__lambda2, int[])).chain.Result.save cannot get frame pointer to main ...\dmd2\src\phobos\std\range.d(1988): Error: function std.range.chain!(MapResult!(__lambda2, int[]),MapResult!(__lambda2, int[])).chain.Result.save cannot get frame pointer to main ...\dmd2\src\phobos\std\range.d(3792): Error: function std.range.Zip!(MapResult!(__lambda2, int[]), MapResult!(__lambda2, int[])).Zip.save cannot get frame pointer to main ...\dmd2\src\phobos\std\range.d(3792): Error: function std.range.Zip!(MapResult!(__lambda2, int[]), MapResult!(__lambda2, int[])).Zip.save cannot get frame pointer to main This code compiles and runs correctly in DMD 2.060. Additional problem: the error messages refer only to the locations inside chain and zip, with no references to the call lines in main().
Comment #1 by k.hara.pg — 2012-12-11T21:11:27Z
Comment #2 by github-bugzilla — 2012-12-17T21:02:49Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/46b612de080bfd7c7a7d0fca090fd43f704acd00 fix Issue 9060 - std.range.chain and std.range.zip cannot get frame pointer Changes to avoid following two errors: * "cannot access frame pointer" * "field xxx must be initialized in constructor, because it is nested struct" https://github.com/D-Programming-Language/phobos/commit/3b683d99bfd85b89baaf6979320a356b375f4169 Merge pull request #1004 from 9rnsr/fix9060 Issue 9060 - std.range.chain and std.range.zip cannot get frame pointer
Comment #3 by bearophile_hugs — 2012-12-17T21:21:11Z
Seems to work. Thank you.