[Issue 24325] New: Type inference has precedence
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 8 10:52:17 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24325
Issue ID: 24325
Summary: Type inference has precedence
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: msnmancini at hotmail.com
```
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.
--
More information about the Digitalmars-d-bugs
mailing list