www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24261] New: Cannot define calling convention of a function

https://issues.dlang.org/show_bug.cgi?id=24261

          Issue ID: 24261
           Summary: Cannot define calling convention of a function
                    prototype in a function scope
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: b2.temp gmx.com



```d
void main()
{
    extern(C) alias MyType = void function();
    pragma(msg, __traits(getLinkage, MyType));
}
```  



 Error: basic type expected, not `alias`
that works at the module scope. --
Nov 24 2023