In c++ 
    
    
    class Preant {
    public:
        void call() {
        
        }
    
    };
    
    class Child : public Preant {
    private:
        void call();
    };
    
    Run

In nim 
    
    
    type
      Preant* = ref object of RootObj
      
      proc call*(this: Preant) =
            echo "Call Preant"
    
    type
      Child* = ref object of Preant
      
      # Unable to privatize Preant call
      proc call(this: Child) =
            echo "Call Child"
    
    
    Run

I don't know how to do it in nim?

Reply via email to