[Issue 13309] DMD accepts yet another invalid alias declaration
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 19 11:42:52 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=13309
Nick Treleaven <nick at geany.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |nick at geany.org
Resolution|--- |INVALID
--- Comment #8 from Nick Treleaven <nick at geany.org> ---
(In reply to Kenji Hara from comment #5)
> No, it's valid in the grammar.
...
> And then, the name fnNtQuerySystemInformation will alias a function type:
>
> extern(Windows) HRESULT(uint, void*, uint, uint*) nothrow
So this was invalid. Also the new alias syntax allows aliasing a function type:
// old
alias extern(Windows) HRESULT fnNtQuerySystemInformation( uint
SystemInformationClass, void* info, uint infoLength, uint* ReturnLength )
nothrow;
// new
alias fnNtQuerySystemInformation = extern(Windows) HRESULT(uint
SystemInformationClass, void* info, uint infoLength, uint* ReturnLength)
nothrow;
--
More information about the Digitalmars-d-bugs
mailing list