Bug 15065 – associative array has no keys property
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-09-16T00:47:00Z
Last change time
2015-09-27T22:36:27Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
vlevenfeld
Comments
Comment #0 by vlevenfeld — 2015-09-16T00:47:57Z
struct X (int[int] x)
{
enum y = x.keys; // OK
alias z = partial!(canFind, y); // OK
alias w = partial!(canFind, x.keys); // Error: no property 'keys' for type 'int[int]'
}
X!([1:2]) zzz;
Comment #1 by k.hara.pg — 2015-09-16T02:30:55Z
Reduced test case:
template partial(alias arg) {}
struct X(int[int] x)
{
alias w = partial!(x.keys);
}
X!([1:2]) zzz;