[dmd-beta] dmd 2.051 beta

Stephan Dilly Dilly at Funatics.de
Wed Dec 15 09:41:35 PST 2010


This beta contains a regression in phobos i guess. The following code 
used to build up to 2.050 but stops working in the beta when compiled 
WITH "-noboundscheck -release -inline":

import std.string;

char* toCString(string _str)
{
  return cast(char*)toStringz(_str);
}

void main(){

  auto foo = toCString("fooo");
}

The compiler chokes:

\src\phobos\std\range.d(287): Error: static assert  "Cannot put a char[] 
into a Appender!(string)"
\src\phobos\std\format.d(985):        instantiated from here: 
put!(Appender!(string),char[])
\src\phobos\std\format.d(1579):        instantiated from here: 
formatValue!(Appender!(string),uint,immutable(char))
\src\phobos\std\format.d(306):        instantiated from here: 
formatGeneric!(Appender!(string),uint,immutable(char))
\src\phobos\std\process.d(339):        instantiated from here: 
formattedWrite!(Appender!(string),immutable(char),uint)

Can this please be fixed b4 release, it is used throughout my whole 
codebase.

Regards,
Stephan


On 15.12.2010 10:38, Walter Bright wrote:
> Tip from Brad got it working.
>
> http://ftp.digitalmars.com/dmd2beta.zip
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>


More information about the dmd-beta mailing list