Summary: Not easy to understand error message with pure and
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from 2010-09-26 10:46:23 PDT ---
This is a wrong D2 program:

struct Foo(int x) {
    pure /*const*/ void bar() {}
pure void spam(int X)(Foo!X arr) {;
void main() {
    Foo!5 f;

DMD 2.049 gives not easy to understand error messages:
test.d(5): Error: function test.Foo!(5) () is not callable using
argument types () const
test.d(9): Error: template instance test.spam!(5) error instantiating is pure, but this is not enough, to compile this code bar() also
needs to be const. I'd like dmd to give a more readable error message, that
suggests how to fix the code.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to