[Issue 24209] static aa initialization of static function variable ICE
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 1 22:37:09 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24209
Iain Buclaw <ibuclaw at gdcproject.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ibuclaw at gdcproject.org
--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject.org> ---
FWIW, gdc emits this error:
```
i24209.d:2:25: error: non-constant expression ‘[1:2]’
2 | static int[int] aa = [1: 2];
| ^
```
Which seems to suggest that lowering is not done by the front-end if the static
variable is declared inside a function/unittest body.
--
More information about the Digitalmars-d-bugs
mailing list