Fix another few issues caused by the upstream v2.063.1 retagging.

This commit is contained in:
David Nadlinger
2013-06-15 15:08:19 +02:00
parent 0e49a57a5f
commit a7882a8ae6
3 changed files with 18 additions and 1 deletions
+15 -1
View File
@@ -1220,7 +1220,7 @@ Lnomatch:
AggregateDeclaration *aad = parent->isAggregateDeclaration();
if (aad)
{
#if DMDV2
#if PULL93
assert(!(storage_class & (STCextern | STCstatic | STCtls | STCgshared)));
if (storage_class & (STCconst | STCimmutable) && init &&
global.params.vfield)
@@ -1229,6 +1229,16 @@ Lnomatch:
const char *s = (storage_class & STCimmutable) ? "immutable" : "const";
fprintf(stderr, "%s: %s.%s is %s field\n", p ? p : "", ad->toPrettyChars(), toChars(), s);
}
#else
if (storage_class & (STCconst | STCimmutable) && init)
{
StorageClass stc = storage_class & (STCconst | STCimmutable);
warning(loc, "%s field with initializer should be static, __gshared, or an enum",
StorageClassDeclaration::stcToChars(NULL, stc));
if (!tb->isTypeBasic())
storage_class |= STCstatic;
}
else
#endif
{
storage_class |= STCfield;
@@ -1960,6 +1970,10 @@ AggregateDeclaration *VarDeclaration::isThis()
if (!(storage_class & (STCstatic | STCextern | STCmanifest | STCtemplateparameter |
STCtls | STCgshared | STCctfe)))
{
#if !PULL93
if ((storage_class & (STCconst | STCimmutable | STCwild)) && init)
return NULL;
#endif
for (Dsymbol *s = this; s; s = s->parent)
{
ad = s->isMember();