```
void main()
{
alias CBType = string function();
static immutable CBType[] callbacks = [
(){return null;},
(){return "hello";}
];
}
```
If `static immutable` is dropped, it compiles. That shows the `CBType[]` is being ignored.
This also happens with associative arrays.
Comment #1 by nick — 2024-01-08T16:23:02Z
Error with v2.106 is:
Error: cannot implicitly convert expression `__lambda1` of type `typeof(null) function() pure nothrow @nogc @safe` to `immutable(string function())`
So `CBType[]` is not ignored, but it is not used to infer the type of the template lambda.
> If `static immutable` is dropped, it compiles
Or when just `static` is dropped.
Comment #2 by robert.schadek — 2024-12-13T19:32:28Z