import std.algorithm;
auto foo() {
bool[string] p;
return p.keys ~ "bar";
}
enum a = foo;
void main() {
}
onlineapp.d(7): Error: keys(p) ~ ["bar"] cannot be interpreted at compile time
onlineapp.d(10): called from here: foo()
Compiles if the array is not empty or p.keys are appended to indirectly.
Comment #1 by robert.schadek — 2024-12-13T19:13:03Z