]> Pileus Git - ~andy/sunrise/blob - dev-lang/dmd/files/2.059-issue-7911.patch
www-servers/webcit: Version bump for bug #123139
[~andy/sunrise] / dev-lang / dmd / files / 2.059-issue-7911.patch
1 diff -Nurp a/src/dmd/attrib.c b/src/dmd/attrib.c
2 --- a/src/dmd/attrib.c  2012-04-17 12:02:10.224883217 +0200
3 +++ b/src/dmd/attrib.c  2012-04-17 12:31:56.293554287 +0200
4 @@ -1402,6 +1402,23 @@ void StaticIfDeclaration::setScope(Scope
5  
6      // But do set the scope, in case we need it for forward referencing
7      Dsymbol::setScope(sc);
8 +
9 +    // Set the scopes for both the decl and elsedecl, as we don't know yet
10 +    // which will be selected, and the scope will be the same regardless
11 +    Dsymbols *d = decl;
12 +    for (int j = 0; j < 2; j++)
13 +    {
14 +        if (d)
15 +        {
16 +           for (size_t i = 0; i < d->dim; i++)
17 +           {
18 +               Dsymbol *s = (*d)[i];
19 +
20 +               s->setScope(sc);
21 +           }
22 +        }
23 +        d = elsedecl;
24 +    }
25  }
26  
27  void StaticIfDeclaration::semantic(Scope *sc)