Cannot take the .keys of shared AA. Is this a regression in 2.087 or a feature?

Piotr Mitana the.mail.of.mi2 at gmail.com
Thu Aug 15 17:33:06 UTC 2019


Code:

import std;

shared(string[string]) dict;

void main()
{
     dict.keys;
}

Error:

/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(3417): 
Error: cannot implicitly convert expression aa of type 
shared(string[string]) to const(shared(string)[string])
onlineapp.d(7): Error: template instance 
`object.keys!(shared(string[string]), shared(string), string)` 
error instantiating

Before D 2.087 it compiled - is this a regression?


More information about the Digitalmars-d-learn mailing list