http://d.puremagic.com/issues/show_bug.cgi?id=6811
Summary: Confusion between string* and immutable(char)*,
related to AA's
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from David Simcha <[email protected]> 2011-10-13 09:43:59 PDT ---
void doExclude(string exclude) {
string[string] aa;
int[] keep;
foreach(int i, h; ["a", "b"]) {
auto ptr = h in aa;
pragma(msg, typeof(ptr)); // string*
pragma(msg, typeof(*ptr)); // string
if(*h != exclude) keep ~= i;
}
}
test.d(9): Error: incompatible types for ((*cast(immutable(char)*)h) !=
(exclude)): 'immutable(char)' and 'string'
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------