```
void fun(const(char)[] a) {}
void fun(const(char)* a) {}
const(char*) a = "a";
void main() {
fun(a);
}
```
Without the literal to initialize it, it chooses fun(const(char)*) as expected. With it, the compiler thinks both match and cannot choose. It should always choose fun(const(char)*).
Comment #1 by robert.schadek — 2024-12-13T19:13:06Z