Issue 11477 - [AA] `T*` as associative array key becomes `const(T)*`
Summary: [AA] `T*` as associative array key becomes `const(T)*`
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P3 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2013-11-08 22:55 UTC by Denis Shelomovskii
Modified: 2022-12-17 10:45 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Denis Shelomovskii 2013-11-08 22:55:06 UTC
---
void main()
{
    int[int*] aa;
    int* k0 = aa.keys[0]; // Error: cannot implicitly convert ... of type const(int)* to int*
    foreach(int* k, int v; aa) // Error: foreach: index must be type const(int)*, not int*
    { }
}
---