Bug 13298 – __traits(calledFunctions, f)

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-08-15T19:05:42Z
Last change time
2024-12-13T18:24:02Z
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: dmd#17676 →

Comments

Comment #0 by bearophile_hugs — 2014-08-15T19:05:42Z
I suggest to add a trait that returns a tuple of all the functions called by a given function, including run-time functions. void foo() {} void bar() {} void spam() { foo(); bar(); } is(__traits(calledFunctions, spam) == TypeTuple!(foo, bar)) This is useful to implement in user code transitive function properties tagged with UDAs. Optionally this trait too can be handy: __traits(isRuntimeFunction, f)
Comment #1 by robert.schadek — 2024-12-13T18:24:02Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17676 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB