[Issue 8542] crosstalk between template instantiations
http://d.puremagic.com/issues/show_bug.cgi?id=8542 --- Comment #12 from github-bugzi...@puremagic.com 2013-02-03 19:24:48 PST --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/468f7e12c4b1eea25bc88463f700fa62988a90cd Replace unittests to avoid issue 8542. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8542] crosstalk between template instantiations
http://d.puremagic.com/issues/show_bug.cgi?id=8542 --- Comment #6 from hst...@quickfur.ath.cx 2013-01-03 21:39:09 PST --- Here's an unexpected data point: I discovered that this bug may be linked to the -property compiler flag. To reproduce this odd effect, checkout the code from: https://github.com/D-Programming-Language/phobos/pull/856, build Phobos without unittest, then check the output of the following commands (I tested this on Linux/64): 1) This one compiles just fine: dmd -unittest -m64 std/algorithm.d generated/linux/debug/64/emptymain.d -of/tmp/x 2) This one produces a whole bunch of template crosstalk errors: dmd -property -unittest -m64 std/algorithm.d generated/linux/debug/64/emptymain.d -of/tmp/x -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8542] crosstalk between template instantiations
http://d.puremagic.com/issues/show_bug.cgi?id=8542 --- Comment #7 from hst...@quickfur.ath.cx 2013-01-03 21:43:08 PST --- Hmm, the -property effect also happens with the simpler test case I posted earlier in comment 4: $ dmd test.d $ # Compiled successfully $ dmd -property test.d test.d(5): Error: no property 'map' for type 'Zip!(Sequence!(n, Tuple!(ulong)), Sequence!(2*n, Tuple!(int)), Sequence!(2*n+1, Tuple!(int)), Repeat!(Sequence!(2*n, Tuple!(int))), Repeat!(Sequence!(2*n+1, Tuple!(int' test.d(17): Error: template instance test.cprod!(Sequence!(2*n, Tuple!(int)), Sequence!(2*n+1, Tuple!(int))) error instantiating test.d(5): Error: no property 'map' for type 'Zip!(Sequence!(n, Tuple!(ulong)), Sequence!(100+n, Tuple!(int)), Sequence!(200+n, Tuple!(int)), Repeat!(Sequence!(100+n, Tuple!(int))), Repeat!(Sequence!(200+n, Tuple!(int' test.d(21): Error: template instance test.cprod!(Sequence!(100+n, Tuple!(int)), Sequence!(200+n, Tuple!(int))) error instantiating $ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8542] crosstalk between template instantiations
http://d.puremagic.com/issues/show_bug.cgi?id=8542 --- Comment #8 from hst...@quickfur.ath.cx 2013-01-03 21:49:54 PST --- Actually, nevermind that. I just realized that -property requires () for map and joiner because they aren't declared with @property (and UFCS does not alleviate the need for parentheses). The sad thing, though, is that my reduced test case no longer produces template crosstalk in git HEAD. :-( -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8542] crosstalk between template instantiations
http://d.puremagic.com/issues/show_bug.cgi?id=8542 --- Comment #9 from hst...@quickfur.ath.cx 2013-01-03 22:01:51 PST --- Hmph. It seems that Timon's original code also compiles fine in git head (without -property). With -property it fails, but seems the reason is that -property requires functions like map and joiner to have trailing parentheses (). The template crosstalk problem seems to have gone away. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8542] crosstalk between template instantiations
http://d.puremagic.com/issues/show_bug.cgi?id=8542 --- Comment #10 from hst...@quickfur.ath.cx 2013-01-03 22:28:37 PST --- git bisect appears to indicate that it was dmd commit 688f7ce593eef75997a2b8f2527d3cd9338692aa that fixed this issue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8542] crosstalk between template instantiations
http://d.puremagic.com/issues/show_bug.cgi?id=8542 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||WORKSFORME --- Comment #11 from Walter Bright bugzi...@digitalmars.com 2013-01-03 23:46:02 PST --- Then we can resolve this as WORKSFORME. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8542] crosstalk between template instantiations
http://d.puremagic.com/issues/show_bug.cgi?id=8542 Jesse Phillips jesse.k.phillip...@gmail.com changed: What|Removed |Added CC||jesse.k.phillip...@gmail.co ||m --- Comment #5 from Jesse Phillips jesse.k.phillip...@gmail.com 2012-10-19 11:23:02 PDT --- I may have duplicated this issue: http://d.puremagic.com/issues/show_bug.cgi?id=8850 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8542] crosstalk between template instantiations
http://d.puremagic.com/issues/show_bug.cgi?id=8542 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment #4 from hst...@quickfur.ath.cx 2012-10-16 17:24:02 PDT --- Here's a somewhat simpler case: auto cprod(R1,R2)(R1 A, R2 B) { return zip(sequence!n(cast(size_t)0), A.save, B.save, repeat(A), repeat(B)) .map!(function(a) = chain( zip(repeat(a[1]), take(a[4].save,a[0])), zip(take(a[3].save,a[0]+1), repeat(a[2])) )).joiner; } void main() { auto A = sequence!2*n(0); auto B = sequence!2*n+1(0); auto AB = cprod(A,B); auto C = sequence!100+n(0); auto D = sequence!200+n(0); auto CD = cprod(C,D); } Produces the error: Error: function test3.cprod!(Sequence!(2*n,Tuple!(int)),Sequence!(2*n+1,Tuple!(int))).cprod.map!(__ funcliteral2).map!(Zip!(Sequence!(n,Tuple!(uint)),Sequence!(100+n,Tuple!(int)),Sequence!(200+n,Tupl e!(int)),Repeat!(Sequence!(100+n,Tuple!(int))),Repeat!(Sequence!(200+n,Tuple!(int).map is a neste d function and cannot be accessed from test3.cprod!(Sequence!(100+n,Tuple!(int)),Sequence!(200+n,Tupl e!(int))).cprod Commenting out either the first three lines (A, B, AB) or the second three lines (C, D, CD) makes the problem go away. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8542] crosstalk between template instantiations
http://d.puremagic.com/issues/show_bug.cgi?id=8542 --- Comment #1 from timon.g...@gmx.ch 2012-08-12 12:45:44 PDT --- importing std.bigint is not required to reproduce. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---