[Issue 1481] New: add final on template function cause local variable be finaled

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 6 19:16:25 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1481

           Summary: add final on template function cause local variable be
                    finaled
           Product: D
           Version: 1.018
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: redsea at 163.com


error message:
Error: cannot modify final variable 'p'

code:

module test;
import test1;

class C
{
   final void test(bool check)()
    {
        int p;
        p++;
    }
}

void main()
{
C c = new C;

c.test!(false)();
}


-- 



More information about the Digitalmars-d-bugs mailing list