Re: strage heisenbug (has scoped destruction, cannot build closure)

2015-03-03 Thread anonymous via Digitalmars-d-learn
On Tuesday, 3 March 2015 at 07:26:13 UTC, ketmar wrote: hi. the following (manually dustmited ;-)) code gives the error from subj on git HEAD: === ztest.d === module ztest; auto streamAsRange(STP) (STP st) { static struct StreamRange(ST) { private: ST strm; public:

Re: strage heisenbug (has scoped destruction, cannot build closure)

2015-03-02 Thread ketmar via Digitalmars-d-learn
p.p.s. sure, i can see where i'm creating a closure. but i can't see how that closure got to IR generator, as it is never executes, there is no need to generate code for it, and it should be removed after checking `static if` condition. signature.asc Description: PGP signature

strage heisenbug (has scoped destruction, cannot build closure)

2015-03-02 Thread ketmar via Digitalmars-d-learn
hi. the following (manually dustmited ;-)) code gives the error from subj on git HEAD: === ztest.d === module ztest; auto streamAsRange(STP) (STP st) { static struct StreamRange(ST) { private: ST strm; public: void put (const(ubyte)[] data) { strm.rawWrite(data); }

Re: strage heisenbug (has scoped destruction, cannot build closure)

2015-03-02 Thread ketmar via Digitalmars-d-learn
p.s. well, it's not a heisenbug, 'cause it reproducible. let's say that it's a... very strange bug. ;-) signature.asc Description: PGP signature