www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9360] New: Bad error message with non-const template method


           Summary: Bad error message with non-const template method
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: rswhite4 googlemail.com

--- Comment #0 from rswhite4 googlemail.com 2013-01-20 14:00:35 PST ---
struct A {
    void test()() {    

void main() {
    const A[4] as;
    foreach (index; 0 .. 4) {

This prints:
/home/c895/c892.d(15): Error: template c892.A.test does not match any function
template declaration. Candidates are:
/home/c895/c892.d(5): c892.A.test()()
/home/c895/c892.d(15): Error: template c892.A.test()() cannot deduce template
function from argument types !()()

It's not easy to understand that you try to call a non-const template method.

Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 20 2013