← Back to index
|
Original Bugzilla link
Bug 7654 – Direct using of Rebindable!T doesn't work
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-06T03:38:00Z
Last change time
2014-02-15T11:27:55Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0
by k.hara.pg — 2012-03-06T03:38:12Z
void foo(immutable(char[]) s) { auto r1 = rebindable(s); // works as expected Rebindable!(typeof(s)) r2 = s; // doesn't work! }
Comment #1
by k.hara.pg — 2012-03-06T03:51:53Z
https://github.com/D-Programming-Language/phobos/pull/480
Comment #2
by github-bugzilla — 2014-02-15T11:06:46Z
Commits pushed to master at
https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/c9fe9679d43de8b960bb0bfcb208637dc28e0452
Fix Issue 7654 - Fix Rebindable of narrow strings. `Rebindable!(const(T)[])` should be `T[]`, but `Rebindable` was using `ElementType` instead of `ElementEncodingType`, which would result in `dchar[]` for narrow strings. This pull fixes this simple mistake.
https://d.puremagic.com/issues/show_bug.cgi?id=7654
https://github.com/D-Programming-Language/phobos/commit/a35a00efb9171297e3119849bb77d2b9a46717df
Merge pull request #1941 from Poita/bug7654 Fix Issue 7654 - Fix Rebindable of narrow strings.