← Back to index
|
Original Bugzilla link
Bug 11694 – std.traits.SetFunctionAttributes does not conserve constness
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-05T18:22:15Z
Last change time
2019-12-20T14:33:17Z
Assigned to
No Owner
Creator
Ellery Newcomer
Depends on
12653
Comments
Comment #0
by ellery-newcomer — 2013-12-05T18:22:15Z
the code: import std.traits; class Z { string a() immutable { return " 1"; } } pragma(msg ,typeof(&Z.a)); pragma(msg, SetFunctionAttributes!(typeof(&Z.a), functionLinkage!(typeof(&Z.a)), functionAttributes!(typeof(&Z.a)))); void main() {} prints out string function() immutable string function() rather than the expected string function() immutable string function() immutable