--- access.c 2009-03-05 01:56:46.000000000 +1100 +++ access.c 2009-03-16 10:47:56.187500000 +1100 @@ -305,12 +305,21 @@ printf("\tthis is in package '%s'\n", s->toChars()); #endif - if (s && s == sc->module->parent) + if (s) { -#if LOG - printf("\ts is in same package as sc\n"); -#endif - return 1; + Dsymbol scp = sc->module->parent; + for (Dsymbol scp = sc->module->parent; + scp && scp->isPackage() && !scp->isModule(); + scp = scp->parent) + { + if (s && s == scp) + { +#if LOG + printf("\ts is in same package as or ancestor package of sc\n"); +#endif + return 1; + } + } }