Summary: static nested class can reference outer scope by
                    template instantiation
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-06-10 13:39:50 PDT ---
class D{
    int x;
    template bar(){
        int foo(){
            return x;
    static class C{
        int foo(){
            return bar!().foo();

C does not have a reference to the enclosing context, therefore the call to
bar!().foo is invalid.
DMD 2.059 accepts the code.

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

Reply via email to