www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16401] New: incorrect fully qualified name in error message

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

          Issue ID: 16401
           Summary: incorrect fully qualified name in error message
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: john.loughran.colvin gmail.com

% cat multisortBreak.d
import std.algorithm.sorting : multiSort;
bool foo(int a, int b){ return true; }

void main()
{
    int[] a = [1,2,3];
    a.multiSort!((a,b) => foo, foo);
}

% dmd multisortBreak.d
multisortBreak.d(7): Error: template multisortBreak.main.multiSort!((a, b) =>
foo, foo).multiSort cannot deduce function from argument types !()(int[]),
candidates are:
/usr/local/Cellar/dmd/2.071.2-b1/include/dlang/dmd/std/algorithm/sorting.d(790):
       multisortBreak.main.multiSort!((a, b) => foo,
foo).multiSort(Range)(Range r) if (validPredicates!(ElementType!Range, less))

multiSort is erroneously being reported as a member of multisortBreak.main

--
Aug 18 2016