www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20168] New: Missing context when CTFE fails with 'no

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

          Issue ID: 20168
           Summary: Missing context when CTFE fails with 'no available
                    source code'
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Keywords: CTFE, diagnostic
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: simen.kjaras gmail.com

int fun2();
int fun() { return fun2(); }
enum a = fun();

The above code gives an error message on line 2 (in fun()). This can be
arbitrarily deep inside a call chain, gives no indication of the call that
instantiated fun().

--
Aug 26 2019