[Issue 23620] 'alias this' is not respected in static array length position
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 14 21:03:06 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23620
Salih Dincer <salihdb at hotmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |salihdb at hotmail.com
--- Comment #4 from Salih Dincer <salihdb at hotmail.com> ---
This isn't a bug!
void main()
{
struct Index
{
size_t value;
alias value this;
}
enum size_t i = Index();
int[i] a;
int[cast(size_t)Index()] b;
static assert(a.length == b.length);
}
--
More information about the Digitalmars-d-bugs
mailing list