January 08, 2024 [Issue 24325] New: Type inference has precedence | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: msnmancini@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. -- |
Copyright © 1999-2021 by the D Language Foundation