Showing with 205 additions and 118 deletions.
  1. +4 −4 src/access.c
  2. +3 −2 src/aggregate.h
  3. +90 −70 src/class.c
  4. +3 −3 src/doc.c
  5. +27 −16 src/e2ir.c
  6. +6 −6 src/func.c
  7. +1 −1 src/json.c
  8. +2 −2 src/template.c
  9. +1 −1 src/tocvdebug.c
  10. +7 −7 src/toobj.c
  11. +1 −1 src/traits.c
  12. +60 −5 test/runnable/interface2.d
8 changes: 4 additions & 4 deletions src/access.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Prot getAccess(AggregateDeclaration *ad, Dsymbol *smember)
{
BaseClass *b = (*cd->baseclasses)[i];

Prot access = getAccess(b->base, smember);
Prot access = getAccess(b->sym, smember);
switch (access.kind)
{
case PROTnone:
Expand Down Expand Up @@ -130,9 +130,9 @@ static bool isAccessible(
for (size_t i = 0; i < cdthis->baseclasses->dim; i++)
{
BaseClass *b = (*cdthis->baseclasses)[i];
Prot access = getAccess(b->base, smember);
Prot access = getAccess(b->sym, smember);
if (access.kind >= PROTprotected ||
isAccessible(smember, sfunc, b->base, cdscope))
isAccessible(smember, sfunc, b->sym, cdscope))
{
return true;
}
Expand All @@ -148,7 +148,7 @@ static bool isAccessible(
for (size_t i = 0; i < cdthis->baseclasses->dim; i++)
{
BaseClass *b = (*cdthis->baseclasses)[i];
if (isAccessible(smember, sfunc, b->base, cdscope))
if (isAccessible(smember, sfunc, b->sym, cdscope))
return true;
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/aggregate.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ class UnionDeclaration : public StructDeclaration
struct BaseClass
{
Type *type; // (before semantic processing)
Prot protection; // protection for the base interface
Prot protection; // protection for the base interface

ClassDeclaration *base;
ClassDeclaration *sym;
unsigned offset; // 'this' pointer offset
FuncDeclarations vtbl; // for interfaces: Array of FuncDeclaration's
// making up the vtbl[]
Expand Down Expand Up @@ -284,6 +284,7 @@ class ClassDeclaration : public AggregateDeclaration
bool isFuncHidden(FuncDeclaration *fd);
FuncDeclaration *findFunc(Identifier *ident, TypeFunction *tf);
void interfaceSemantic(Scope *sc);
unsigned setBaseInterfaceOffsets(unsigned baseOffset);
bool isCOMclass();
virtual bool isCOMinterface();
bool isCPPclass();
Expand Down
Loading