[Bug 302] `function` type UDA postfixes not allowed
gdc-bugzilla at gdcproject.org
gdc-bugzilla at gdcproject.org
Wed Aug 15 18:03:58 UTC 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=302
Iain Buclaw <ibuclaw at gdcproject.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject.org> ---
> Should work according to D spec at https://dlang.org/spec/declaration.html#BasicType2X function type, but does not.
Nope, the error is correct and in accordance to the spec. Only built-in
attributes are allowed as postfixes - UDAs are not built-in.
> @attribute("ms_abi") size_t function(int, int) foo; // Example, calling does not use ms_abi
That could be a failing of the front-end to propagate UDAs to variables.
https://github.com/D-Programming-GDC/GDC/blob/c2fc3dbf5dc844583344f9cc6e1d4ba32bd736bf/gcc/d/decl.cc#L1321-L1328
I'll have to check.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the D.gnu
mailing list