Re: Trying to get current function name results in compiler error with __traits

2018-12-07 Thread Sepheus via Digitalmars-d-learn
On Friday, 7 December 2018 at 02:37:34 UTC, Arun Chandrasekaran wrote: I'm trying to get the current function name and apparently the commented line errors out. What am I doing wrong? https://run.dlang.io/is/EGsRU2 ``` #!/usr/bin/rdmd void main() { import std.experimental.all; void

Re: Trying to get current function name results in compiler error with __traits

2018-12-06 Thread Neia Neutuladh via Digitalmars-d-learn
On Fri, 07 Dec 2018 02:37:34 +, Arun Chandrasekaran wrote: > I'm trying to get the current function name and apparently the commented > line errors out. > > What am I doing wrong? Referring to nested functions is weird. Dotted identifiers let you traverse aggregates. Modules, C++ namespaces

Trying to get current function name results in compiler error with __traits

2018-12-06 Thread Arun Chandrasekaran via Digitalmars-d-learn
I'm trying to get the current function name and apparently the commented line errors out. What am I doing wrong? https://run.dlang.io/is/EGsRU2 ``` #!/usr/bin/rdmd void main() { import std.experimental.all; void foo() { // __traits(identifier, mixin(__FUNCTION__)).writeln; //