Skip to content
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

@trusted ignored on alias declarations when specified as prefix #17726

Open
dlangBugzillaToGithub opened this issue Oct 3, 2015 · 2 comments

Comments

@dlangBugzillaToGithub
Copy link

Vladimir Panteleev (@CyberShadow) reported this on 2015-10-03T13:15:29Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=15142

CC List

  • Bolpat

Description

@dlangBugzillaToGithub
Copy link
Author

dlang-bugzilla (@CyberShadow) commented on 2015-10-03T13:16:10Z

alias a = @trusted void function();
alias b = void function() @trusted;
pragma(msg, a);
pragma(msg, b);
static assert(is(a == b));

@dlangBugzillaToGithub
Copy link
Author

qs.il.paperinik commented on 2024-07-15T12:56:47Z

Alias doesn’t support prefix attributes this way.
```d
alias a = @trusted void function();
```

You have to write:
```d
@trusted alias a = void function();
```
If you want prefix syntax. Annoying.

My bet is this is from the alias Blabla x days, because this works:
```d
@trusted alias void function() a;
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant