On Tue, Nov 11, 2008 at 10:53 AM, Yonggang Luo <[EMAIL PROTECTED]> wrote:
> I have a file that named
> baseClass.d
> The content is
> module baseClass;
>
> public class Base
> {
> }
>
> public void Function()
> {
> }
>
>
> private class BaseAlternative
> {
> }
>
> private void FunctionAlternative()
> {
> }
>
> And the other file that named
> subClass.d
> The content is
> module subClass;
> private import baseClass;
>
> class Sub:Base /*Is this legal?*/
> {
> };

Of course it's legal.  "Base" is public.

> void DoSomeThins()
> {
>        Function(); /*Is this legal?*/
> }

Again, yes, this is legal, since "Function" is public.

Anything that is public is accessible from other modules.

Reply via email to