X-Git-Url: https://git.llucax.com/software/druntime.git/blobdiff_plain/1f3a9af059166187064490d1cae80bd11fb8737c..HEAD:/src/compiler/dmd/util/utf.d diff --git a/src/compiler/dmd/util/utf.d b/src/compiler/dmd/util/utf.d index 50d4a51..552ab34 100644 --- a/src/compiler/dmd/util/utf.d +++ b/src/compiler/dmd/util/utf.d @@ -334,7 +334,7 @@ unittest assert(i == 3); static s4 = - [ "\xE2\x89"c, // too short + [ "\xE2\x89"c[], // too short "\xC0\x8A", "\xE0\x80\x8A", "\xF0\x80\x80\x8A", @@ -586,7 +586,7 @@ Checks to see if string is well formed or not. $(D S) can be an array */ void validate(S)(in S s) { - invariant len = s.length; + auto len = s.length; for (size_t i = 0; i < len; ) { decode(s, i); @@ -863,7 +863,7 @@ unittest { debug(utf) printf("utf.toUTF.unittest\n"); - auto c = "hello"c; + auto c = "hello"c[]; auto w = toUTF16(c); assert(w == "hello"); auto d = toUTF32(c);