local const functions - bug ?

Basile B. via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jul 7 03:33:39 PDT 2016


this compiles without error:


struct Foo
{
     int i;
     void bar()
     {
         void foo() const
         {
             i = 1;
         }
         foo;
     }
}

In this case "const" seems to be a noop. Do you think it's a bug 
? Shouldn't "const" be applied, despite of foo() inaccessibility ?


More information about the Digitalmars-d-learn mailing list