Bug 20060 – new syntax for function type aliases rejects return types that contain suffixes

Status
RESOLVED
Resolution
INVALID
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-07-17T08:51:55Z
Last change time
2019-07-25T09:01:31Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Basile-z

Comments

Comment #0 by b2.temp — 2019-07-17T08:51:55Z
While trying to remove old syntax from phobos, found this: --- alias int[] F8(); // OK, old syntax alias F8 = int[](); // NG, Error: function declaration without return type.... ---
Comment #1 by b2.temp — 2019-07-17T09:29:46Z
Actually the grammar doesn't include Type2 (i.e the suffixes) so there's no "fraud" on the specs and what the specs say is handled. But really Type2 should be considered otherwise the old syntax is not interchangeable with the new.
Comment #2 by dfj1esp02 — 2019-07-25T09:01:31Z
alias F8 = int[] function();