mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-10-26 19:57:26 +01:00
Fix another few issues caused by the upstream v2.063.1 retagging.
This commit is contained in:
+15
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user