-
-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Old alias syntax accepts "ref" #18724
Labels
Comments
maxim commented on 2013-11-28T07:46:39ZMore nonsense:
alias ref int ri;
//alias in int ii;
alias int oi;
//alias lazy int li;
//alias out int outi;
alias pure int pi;
alias @safe int si;
//alias trusted int ti;
alias nothrow int nthi;
alias auto int ai;
alias @property int pri;
alias @disable int di;
alias scope int sci;
alias align(16) int ali;
alias abstract int absi;
alias final int fi;
alias override int ovi;
alias inout int inoui;
alias synchronized int syi;
alias static int stati;
It is unclear however, whether this is a part of major accepts-invalid bug (dmd is permissive in allowing to apply attributes to declarations, so here is particular case) or defficiency in old alias syntax parsing. |
public (@mihails-strasuns) commented on 2013-11-28T07:52:06ZWhatever it is, current behavior is extremely confusing for newbies as one may expect it to actually work in example like provided in the first post. |
bearophile_hugs commented on 2013-11-28T08:02:54ZSee also Issue 3934 |
andrej.mitrovich (@AndrejMitrovic) commented on 2014-04-22T21:17:36Z*** Issue 12299 has been marked as a duplicate of this issue. *** |
andrej.mitrovich (@AndrejMitrovic) commented on 2014-04-22T21:17:49Z*** Issue 12257 has been marked as a duplicate of this issue. *** |
rburners commented on 2015-06-04T02:30:13Zphobos PR https://github.com/D-Programming-Language/phobos/pull/2995
is sort of blocked by:
template RefType(T) alias RefType = ref T;
not working anymore |
qs.il.paperinik commented on 2021-01-10T00:24:27ZThe grammar allows this to make
alias RefDG = ref int delegate();
legal. Having ref be accepted but with no effect is nothing special about the D compiler. It accepts a lot of annotations that have no effect.
The question which cases are accepts-invalid and which are not is mostly a matter of taste. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dicebot (@mihails-strasuns) reported this on 2013-11-28T07:29:22Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=11632
CC List
Description
The text was updated successfully, but these errors were encountered: