hi,

there seems to be a regression regarding compile time evaluation of startsWith:

import std.string;

const bool ok = startsWith("ab", 'a');
const bool fails = startsWith("ab", "a");

produces
c:\l\dmd2\windows\bin\..\..\src\phobos\std\functional.d(176): Error: static assert "Bad binary function q{a == b}. You need to use a valid D expression using symbols a of type dchar and b of type string." c:\l\dmd2\windows\bin\..\..\src\phobos\std\functional.d(179): instantiated from here: Body!(dchar,string) c:\l\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(1981): instantiated from here: result!(dchar,string)

This worked for me in 2.046.

Rainer

Walter Bright wrote:

http://ftp.digitalmars.com/dmd1beta.zip
http://ftp.digitalmars.com/dmd2beta.zip
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta


_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to