[Issue 16215] New: Nested class unable to resolve outer class variables in certain scenarios

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jun 27 18:08:02 PDT 2016


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

          Issue ID: 16215
           Summary: Nested class unable to resolve outer class variables
                    in certain scenarios
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: puneet at coverify.org

This is one of the corner cases that I could reduce.

bool frop(int f) {return true;}
class Bar {
  int zoo;
  class Foo {
    bool foo() {
      return (zoo).frop();
    }
  }
}

$  dmd -c test.d
test.d(6): Error: need 'this' for 'zoo' of type 'int'

--


More information about the Digitalmars-d-bugs mailing list