www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13350] New: is(typeof(fun)) causes link error when template


          Issue ID: 13350
           Summary: is(typeof(fun)) causes link error when template fun
                    calls undefined reference
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: monarchdodra gmail.com

auto red()()
    return foo();

static int foo();

void main(string[] args)
    int[] data;
main.d:(.text._D4main8__T3redZ3redFZi+0x5): undefined reference to

This is wrong, since the program never actually needed to call foo.

Seems to only trigger on Linux, and was discovered in Phobos:

Aug 21 2014