Summary: Poorly formed error against non-const template on
                    const object
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Jesse Phillips <> 2010-10-22 
09:18:10 PDT ---
The program below fails to compile because the MyClass.get template method is
not const. But this report is on the error message returned:

.\templateconst.d(10): Error: function
et!(double).get () is not callable using argument types ()

I would expect it to complain that the call was not to a const method on a
const object.

void main() {
   MyClass a;

void test(const MyClass c) {
   auto b = c.get!double;

class MyClass {
   real pi = 3.14;

   T get(T)() {
      return cast(T) pi;

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

Reply via email to