Bug 12705 – @system is missing when using getFunctionAttributes on a typeof(function)

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-05-05T20:47:00Z
Last change time
2014-05-08T14:55:52Z
Assigned to
andrej.mitrovich
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2014-05-05T20:47:06Z
This reports becomes valid after https://github.com/D-Programming-Language/dmd/pull/3506 is merged (soon). ----- struct S { void testSystem() @system { } } void main() { // tuple("@system") pragma(msg, typeof(S.testSystem)); // tuple("@system") pragma(msg, __traits(getFunctionAttributes, S.testSystem)); // tuple() pragma(msg, __traits(getFunctionAttributes, typeof(S.testSystem))); } ----- This seems to be unrelated to getFunctionAttributes, but is some internal issue.
Comment #1 by andrej.mitrovich — 2014-05-08T11:31:05Z
Comment #2 by github-bugzilla — 2014-05-08T14:55:52Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/328b5e51df3e901cff4c8006c837d72a37d00464 Fix Issue 12705 and Fixup Pull 3501 - Default trust implies @system, and typeof(func) should extract proper function attributes. https://github.com/D-Programming-Language/dmd/commit/e1e28ec7ed869b15b065673ca774fe53f2f19d42 Merge pull request #3533 from AndrejMitrovic/FixupAttribs Fix Issue 12705 and Fixup Pull 3501 - Fix @system and missing attributes when typeof(func) is used