http://d.puremagic.com/issues/show_bug.cgi?id=7917
--- Comment #2 from Russel Winder <[email protected]> 2012-04-16 04:41:09 PDT --- Given the code: import std.algorithm ; import std.range ; import std.stdio ; import std.typecons ; double partialSum ( immutable Tuple ! ( int , int , double ) data ) { return 1.0 ; } void execute ( immutable int numberOfTasks ) { immutable n = 1000000000 ; immutable delta = 1.0 / n ; immutable sliceSize = n / numberOfTasks ; immutable pi = reduce ! ( ( a , b ) => a + b ) ( 0.0 , map ! ( partialSum ) ( map ! ( i => tuple ( i , cast ( int ) sliceSize , cast ( double ) delta ) ) ( iota ( numberOfTasks ) ) ) ) ; } int main ( immutable string[] args ) { execute ( 1 ) ; return 0 ; } The problem lies with the cast of sliceSice. Change the parameter to a literal and it goes away. Change the definition of sliceSize and it goes away. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
