www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23408] New: __FUNCTION__ does resolve correctly

https://issues.dlang.org/show_bug.cgi?id=23408

          Issue ID: 23408
           Summary: __FUNCTION__ does resolve correctly
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: razvan.nitu1305 gmail.com

import std;

string foo(string arg)
{
    return arg;
}

void bar(string s = foo(__FUNCTION__))
{
    assert(s != "");  // this fails
}

void main()
{
    bar();
}

This currently blocks the implementation of arrayCat lowering.

--
Oct 12 2022