Skip to content

Commit

Permalink
Merge pull request #3390 from yebblies/ddmdfix
Browse files Browse the repository at this point in the history
[DDMD] Fix recent changes that have broken DDMD
  • Loading branch information
AndrejMitrovic committed Mar 18, 2014
2 parents f17dfa3 + 32dbd55 commit 32b1a96
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/dsymbol.c
Expand Up @@ -901,7 +901,7 @@ Dsymbol *ScopeDsymbol::search(Loc loc, Identifier *ident, int flags)
//printf("\ts = '%s.%s', prot = %d\n", toChars(), s1->toChars(), s1->prot());
// The found symbol which has private access should be invisible
// FIXME: Issue 10604 - Not consistent access check for overloaded symbols
if ((flags & IgnorePrivateMembers) && /*!s1->isOverloadable() && */s1->prot() == PROTprivate)
if ((flags & IgnorePrivateMembers) && s1->prot() == PROTprivate)
s1 = NULL;
#if 1
if (!s1 || !imports)
Expand Down Expand Up @@ -1060,7 +1060,7 @@ Dsymbol *ScopeDsymbol::search(Loc loc, Identifier *ident, int flags)
}

// FIXME: Issue 10604 - Not consistent access check for overloaded symbols
if (!(flags & IgnoreErrors) /*&& !s->isOverloadable()*/ &&
if (!(flags & IgnoreErrors) &&
s->prot() == PROTprivate && !s->parent->isTemplateMixin())
{
if (!s->isImport())
Expand Down
4 changes: 2 additions & 2 deletions src/expression.c
Expand Up @@ -7066,8 +7066,8 @@ Expression *DotIdExp::semanticY(Scope *sc, int flag)
buf.writestring(" ");
buf.writestring(imp->mod->toChars());
buf.writeByte(0);
char *s = buf.extractData();
e = new StringExp(loc, s, strlen(s), 'c');
char *str = buf.extractData();
e = new StringExp(loc, str, strlen(str), 'c');
e = e->semantic(sc);
return e;
}
Expand Down
3 changes: 2 additions & 1 deletion src/expression.h
Expand Up @@ -1069,8 +1069,9 @@ class ArrayLengthExp : public UnaExp
void accept(Visitor *v) { v->visit(this); }
};

struct IntervalExp : Expression
class IntervalExp : public Expression
{
public:
Expression *lwr;
Expression *upr;

Expand Down
4 changes: 2 additions & 2 deletions src/import.c
Expand Up @@ -96,7 +96,7 @@ PROT Import::prot()
Import *Import::copy()
{
Import *imp = (Import *)mem.malloc(sizeof(Import));
memcpy(imp, this, sizeof(Import));
memcpy((void *)imp, (void *)this, sizeof(Import));
return imp;
}

Expand Down Expand Up @@ -392,7 +392,7 @@ void Import::importScope(Scope *sc)
}
else
{
Package *pkg = prev->isPackage();
pkg = prev->isPackage();
assert(pkg);
//printf("[%s] pkg = %d, pkg->aliassym = %p, mod = %p, mod->isPackageFile = %d\n", loc.toChars(), pkg->isPkgMod, pkg->aliassym, mod, mod->isPackageFile);
if (pkg->isPkgMod == PKGunknown && mod->isPackageFile)
Expand Down

0 comments on commit 32b1a96

Please sign in to comment.