Bug 12089 – std.utf.validate and inout(char[]) failts to compile

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-06T06:40:00Z
Last change time
2014-02-27T20:13:24Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
john.loughran.colvin

Comments

Comment #0 by john.loughran.colvin — 2014-02-06T06:40:20Z
import std.utf; void foo(inout(char[]) a) { validate(a); } /home/space/phujfj/Installations/dmd/include/std/utf.d(954): Error: template instance std.utf.codeUnitLimit!(const(inout(char)[])) does not match template declaration codeUnitLimit(S) if (isSomeChar!(ElementEncodingType!S)) /home/space/phujfj/Installations/dmd/include/std/utf.d(956): Error: template std.utf.decodeImpl cannot deduce function from argument types !(true)(const(inout(char)[]), ulong), candidates are: /home/space/phujfj/Installations/dmd/include/std/utf.d(1059): std.utf.decodeImpl(bool canIndex, S)(auto ref S str, ref size_t index) if (is(S : const(char[])) || isInputRange!S && is(Unqual!(ElementEncodingType!S) == char)) /home/space/phujfj/Installations/dmd/include/std/utf.d(1194): std.utf.decodeImpl(bool canIndex, S)(auto ref S str, ref size_t index) if (is(S : const(wchar[])) || isInputRange!S && is(Unqual!(ElementEncodingType!S) == wchar)) /home/space/phujfj/Installations/dmd/include/std/utf.d(1264): std.utf.decodeImpl(bool canIndex, S)(auto ref S str, ref size_t index) if (is(S : const(dchar[])) || isInputRange!S && is(Unqual!(ElementEncodingType!S) == dchar)) /home/space/phujfj/Installations/dmd/include/std/utf.d(2007): Error: template instance std.utf.decode!(const(inout(char)[])) error instantiating inouttest.d(4): instantiated from here: validate!(inout(char)[]) /home/space/phujfj/Installations/dmd/include/std/utf.d(2007): Error: decode (auto ref const(inout(char)[]) str, ref ulong index) is not callable using argument types (const(inout(char)[]), ulong) inouttest.d(4): Error: template instance std.utf.validate!(inout(char)[]) error instantiating
Comment #1 by john.loughran.colvin — 2014-02-07T00:11:35Z
Marked as regression: this worked with 2.064
Comment #2 by k.hara.pg — 2014-02-09T18:24:47Z
Comment #3 by github-bugzilla — 2014-02-09T23:53:28Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/aaf4bd8df5f612bca0c80ed76b5d2fc3a7c3f23c fix Issue 12089 - std.utf.validate and inout(char[]) failts to compile https://github.com/D-Programming-Language/dmd/commit/c3b9b2497860e39b7ca5f4fd8da2f6ba75ef9e0c Merge pull request #3239 from 9rnsr/fix12089 [REG2.065a] Issue 12089 - std.utf.validate and inout(char[]) failts to compile
Comment #4 by github-bugzilla — 2014-02-10T07:32:49Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/2763ee14661faf985fe17df776e79365c80181ac fix Issue 12089 - std.utf.validate and inout(char[]) failts to compile Unqual should support inout(const(T)) https://github.com/D-Programming-Language/phobos/commit/a04db417369b197262d9f64a9c621eb64c3e078b Merge pull request #1921 from 9rnsr/fix12089 [REG2.065a] Issue 12089 - std.utf.validate and inout(char[]) failts to compile
Comment #5 by github-bugzilla — 2014-02-11T05:13:50Z
Commit pushed to 2.065 at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/8e8fd6490c06ca4c39b534b53927f6be829e1a88 Merge pull request #1921 from 9rnsr/fix12089 [REG2.065a] Issue 12089 - std.utf.validate and inout(char[]) failts to compile
Comment #6 by github-bugzilla — 2014-02-12T14:37:31Z
Commit pushed to 2.065 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/45fda4c7868fe0a85b7bdabbeca33c893b60c85a Merge pull request #3239 from 9rnsr/fix12089 [REG2.065a] Issue 12089 - std.utf.validate and inout(char[]) failts to compile
Comment #7 by github-bugzilla — 2014-02-27T20:13:24Z