March 07, 2012 [Issue 7665] New: Problem with fixed-sized associative mutable array key assignment | ||||
---|---|---|---|---|
| ||||
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@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@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: ------- |
Copyright © 1999-2021 by the D Language Foundation