[Issue 7904] Template instantiation failure depending on compilation order
https://d.puremagic.com/issues/show_bug.cgi?id=7904 Vladimir Panteleev thecybersha...@gmail.com changed: What|Removed |Added Resolution|INVALID |WORKSFORME --- Comment #3 from Vladimir Panteleev thecybersha...@gmail.com 2013-11-30 07:32:05 EET --- My apologies, this was a bad reduction - an obvious fact I should have noticed. Here is a working test case for DMD 2.059: === a.d === import std_algorithm; string longPath(string s) { s.startsWith(); assert(0); } === b.d === import std_algorithm; void handleABC() { replace() ; } void dumpScriptTrait() { a; } === std_algorithm.d === template binaryFun(alias fun) { } R find(alias pred = a == b, R, E)(R , E ) if (is(typeof(binaryFun!pred()) )) { } R1 find(R1, R2)(R1 , R2 ) { assert(false); } bool startsWith()(){} bool startsWith(alias pred = a == b, R1, R2)(R1 , R2 ) if (is(typeof(binaryFun!pred))) { return false; } char[] replace()() { find(, ); assert(0); } However, this bug was fixed in 2.064.2. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7904] Template instantiation failure depending on compilation order
https://d.puremagic.com/issues/show_bug.cgi?id=7904 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #2 from Kenji Hara k.hara...@gmail.com 2013-11-24 04:18:38 PST --- This is invalid issue. in std_algorithm.d: dchar front(A)(A) { } uint startsWith()() { } should be: dchar front(A)(A) { return 'a'; } uint startsWith()() { return 1; } After the fix, the sample code compiles normally. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7904] Template instantiation failure depending on compilation order
http://d.puremagic.com/issues/show_bug.cgi?id=7904 SomeDude lovelyd...@mailmetrash.com changed: What|Removed |Added CC||lovelyd...@mailmetrash.com --- Comment #1 from SomeDude lovelyd...@mailmetrash.com 2012-04-21 11:36:46 PDT --- This looks like a duplicate of issue 7852, although the error messages are different. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---