The compiler can't "see" an inner class

Emmanuelle VuLXn6DBW at PPtUm7TvV6nsw.com
Sun Oct 27 17:52:51 UTC 2019


Hello! See snippet:

---
interface AST
{
     static interface Expr : AST
     {
         final static class Name : Expr
         {
             override void accept(AST.Visitor v) { 
v.visitName(this); }
         }
     }

     final static class Visitor
     {
         void visitName(AST.Expr.Name name);
     }

     void accept(AST.Visitor v);
}
---

If you try to compile that, dmd v2.088.0 complains:

---
Error: no property Name for type onlineapp.AST.Expr
---

How come? It's defined right there. I would really like some 
pointers on this, thanks!


More information about the Digitalmars-d-learn mailing list