www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19284] New: alias this not used in nested functions of a method

https://issues.dlang.org/show_bug.cgi?id=19284

          Issue ID: 19284
           Summary: alias this not used in nested functions of a method
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: eyal weka.io

struct S { int x; }
struct T {
    S s;
    alias s this;
    void f() {
        x = 1;
        void wrapped() { x = 1; } // <-- 'x' not found, whereas 's.x' works
fine
    }
}

--
Oct 02 2018