[Issue 7665] New: Problem with fixed-sized associative mutable array key assignment
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 7 11:10:17 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7665
Summary: Problem with fixed-sized associative mutable array key
assignment
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-03-07 11:10:20 PST ---
Related to bug 7664
void main() {
enum N = 4;
char[] A = "hello".dup;
uint[char[N]] dict;
dict[*cast(immutable char[4]*)(A[0 .. N].ptr)] = 0; // OK
dict[A[0 .. N]] = 0; // line 6, error
}
DMD 2.059head gives:
test.d(6): Error: cannot implicitly convert expression (A[0u..4u]) of type
char[] to char[4u]
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list