Bug 15142 – @trusted ignored on alias declarations when specified as prefix

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-10-03T13:15:29Z
Last change time
2024-12-13T18:45:03Z
Assigned to
No Owner
Creator
Vladimir Panteleev
See also
https://issues.dlang.org/show_bug.cgi?id=12527, https://issues.dlang.org/show_bug.cgi?id=12529
Moved to GitHub: dmd#17726 →

Comments

Comment #0 by dlang-bugzilla — 2015-10-03T13:15:29Z
Comment #1 by dlang-bugzilla — 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));
Comment #2 by qs.il.paperinik — 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; ```
Comment #3 by robert.schadek — 2024-12-13T18:45:03Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17726 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB