Bug 24261 – Cannot define calling convention of a function prototype in a function scope

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-11-24T21:23:41Z
Last change time
2024-12-13T19:32:00Z
Assigned to
No Owner
Creator
basile-z
Moved to GitHub: dmd#20364 →

Comments

Comment #0 by b2.temp — 2023-11-24T21:23:41Z
## test case ```d void main() { extern(C) alias MyType = void function(); pragma(msg, __traits(getLinkage, MyType)); } ``` ## output > Error: basic type expected, not `alias` ## notes that works at the module scope.
Comment #1 by nick — 2024-05-31T18:02:36Z
Use: alias MyType = extern(C) void function();
Comment #2 by robert.schadek — 2024-12-13T19:32:00Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20364 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB