[Issue 7664] New: Problem with fixed-sized associative array key assignment
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 7 11:06:15 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7664
Summary: Problem with fixed-sized associative 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:06:18 PST ---
I think this code has to be valid:
void main() {
auto s = "hello";
uint[immutable char[4]] aa;
aa[s[0 .. 4]] = 0;
}
But DMD 2.059head gives:
test.d(4): Error: cannot implicitly convert expression (s[0u..4u]) of type
string to immutable(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