import `Class` is used as a type

Injeckt vinsentlou9 at gmail.com
Sat Sep 10 16:59:50 UTC 2022


I'm trying use classes in my project, but when i'm try inherit 
class, I get error:

         Error: import `Server.Console` is used as a type


Server.d:

         module Server;

         import std.string;
         import core.sys.windows.windows;
         import Console;

         class Server : Console {
             this(HANDLE hIn, HANDLE hOut) {
                 super(hIn, hOut);
             }

             ~this() {
                 // Delete object;
             }
         }


Console.d:

         module Console;

         import std.string;
         import core.sys.windows.windows;

         class Console {
             public:
                 HANDLE hIn;
                 HANDLE hOut;

             this(HANDLE hIn, HANDLE hOut) {
                 this.hIn = hIn;
                 this.hOut = hOut;
             }
         }

What does it mean?


More information about the Digitalmars-d-learn mailing list