← Back to index
|
Original Bugzilla link
Bug 7621 – Immutable type equivalence problem
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-01T13:14:00Z
Last change time
2012-03-25T20:53:04Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0
by bearophile_hugs — 2012-03-01T13:14:49Z
I don't understand this bug. D2 code: void main() { enum uint N = 4u; char[] A = "hello".dup; uint[immutable char[N]] dict; dict[*cast(immutable char[4]*)(A[0 .. N].ptr)] = 0; // OK dict[*cast(immutable char[N]*)(A[0 .. N].ptr)] = 0; // line 6, error } DMD 2.059head gives: test.d(6): Error: cannot implicitly convert expression (*cast(immutable(char[N]*))cast(char*)A[0u..4u]) of type immutable(char[N]) to immutable(char[4u])
Comment #1
by k.hara.pg — 2012-03-24T23:04:24Z
https://github.com/D-Programming-Language/dmd/pull/838
Comment #2
by github-bugzilla — 2012-03-25T20:39:02Z
Commit pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/555bb0d25c908fb2811c665372510b529088c814
Merge pull request #838 from 9rnsr/fix7621 Issue 7621 - Immutable type equivalence problem