contains method on immutable sorted array
Andrey
saasecondbox at yandex.ru
Tue Oct 22 06:40:36 UTC 2019
On Monday, 21 October 2019 at 20:44:29 UTC, Nicholas Wilson wrote:
> works, so I guess contains doesn't work with immutable?
> If you can do some more research into this and confirm it then,
> please file a bug report.
As I understand - yes. It doesn't work with immutable object.
Also I see the same problem with 'const' and 'shared' object:
> shared values = sort(cast(wstring[])["й", "ц", "ук", "н"]);
> const values = sort(cast(wstring[])["й", "ц", "ук", "н"]);
> values.contains("ук"w).writeln; // error
So you think it is a bug in compiler?
More information about the Digitalmars-d-learn
mailing list