On 03/10/2016 12:37 AM, Manu via Digitalmars-d wrote:
module x.a;

class A
{
package:
  int f()
  {
    return 0;
  }
}


============================
module x.b;

import x.a;

class B : A
{
package:
  override int f()
  {
    return 0;
  }
}

error : function x.b.B.f package method is not virtual and cannot override

Why? I have a UI system with modules for each node type. UI internal
stuff is naturally 'package'. Virtuals are perfectly reasonable within
a package.

I would recommend using the explicit form of package ``package(x):`` although no idea if that'll help you out here.


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Reply via email to