www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13823] New: Diagnostic for accessing wrongly-instantiated


          Issue ID: 13823
           Summary: Diagnostic for accessing wrongly-instantiated
                    templated aggregate needs to improve
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: andrej.mitrovich gmail.com

class C(bool b = false) { static void foo() { } }

void main()

 Error: no property 'foo' for type 'void'
Please don't hijack this issue with requests for "C" to auto-instantiate the template, this is part of a separate enhancement request which already exists. In the meantime, the above should emit something helpful, such as:
 Error: "C" was not properly instantiated, use C!(...).foo instead.
Dec 05 2014