Bug in gdc-4.3 std.random? [was: Re: Status updates (and PPA packages) for gdc]

Iain Buclaw ibuclaw at ubuntu.com
Tue May 11 22:45:08 PDT 2010


Joseph Wakeling Wrote:

> Dear Iain,
> 
> I finally got round to installing gdc-4.3 from your PPA and had a try.
> Unfortunately, first thing I ran into an error while compiling:
> 
> -------------------------------------------
> /usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d2/4.3.4/std/random.d:652:
> function
> std.random.UniformDistribution!(double,boundaries).UniformDistribution.opCall
> (double a, double b) does not match parameter types
> (double,MersenneTwisterEngine!(uint,32,624,397,31,-1727483681u,11,7,-1658038656u,15,-272236544u,18))
> /usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d2/4.3.4/std/random.d:652:
> Error: cannot implicitly convert expression (b) of type
> MersenneTwisterEngine!(uint,32,624,397,31,-1727483681u,11,7,-1658038656u,15,-272236544u,18)
> to double
> -------------------------------------------
> 
> The same code compiles without a whisper with dmd so I'm guessing this is an error
> in Phobos 2.015 ... ?
> 
> Best wishes,
> 
>     -- Joe

Does dmd-2.015 compile the code correctly?

I have not used D2, to be honest, but from the errors emitted, looks like you are calling a function with incompatible datatypes as arguments.

Regards



More information about the D.gnu mailing list