Changeset 1362:194852badf8c
- Timestamp:
- 05/16/09 12:22:09
(16 years ago)
- Author:
- Christian Kamm <kamm incasoftware de>
- branch:
- default
- Message:
Don't always expand aliases to FuncDecls? to FuncAliasDecls? - breaks for single
functions.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| Revision 1358:78038e540342 |
Revision 1362:194852badf8c |
| 500 | else | 500 | else |
|---|
| 501 | { | 501 | { |
|---|
| 502 | FuncDeclaration *f = s->toAlias()->isFuncDeclaration(); | 502 | FuncDeclaration *f = s->toAlias()->isFuncDeclaration(); |
|---|
| 503 | if (f) | 503 | if (f) |
|---|
| 504 | { | 504 | { |
|---|
| 505 | FuncAliasDeclaration *fa = new FuncAliasDeclaration(f); | | |
|---|
| 506 | fa->importprot = importprot; | | |
|---|
| 507 | if (overnext) | 505 | if (overnext) |
|---|
| 508 | { | 506 | { |
|---|
| | | 507 | FuncAliasDeclaration *fa = new FuncAliasDeclaration(f); |
|---|
| | | 508 | fa->importprot = importprot; |
|---|
| 509 | if (!fa->overloadInsert(overnext)) | 509 | if (!fa->overloadInsert(overnext)) |
|---|
| 510 | ScopeDsymbol::multiplyDefined(0, f, overnext); | 510 | ScopeDsymbol::multiplyDefined(0, f, overnext); |
|---|
| 511 | overnext = NULL; | 511 | overnext = NULL; |
|---|
| 512 | } | 512 | s = fa; |
|---|
| 513 | s = fa; | 513 | s->parent = sc->parent; |
|---|
| 514 | s->parent = sc->parent; | 514 | } |
|---|
| 515 | } | 515 | } |
|---|
| 516 | if (overnext) | 516 | if (overnext) |
|---|
| 517 | ScopeDsymbol::multiplyDefined(0, s, overnext); | 517 | ScopeDsymbol::multiplyDefined(0, s, overnext); |
|---|
| 518 | if (s == this) | 518 | if (s == this) |
|---|
| 519 | { | 519 | { |
|---|
| Revision 1358:78038e540342 |
Revision 1362:194852badf8c |
| 1558 | next = s->isDeclaration(); | 1558 | next = s->isDeclaration(); |
|---|
| 1559 | if (next == a) | 1559 | if (next == a) |
|---|
| 1560 | break; | 1560 | break; |
|---|
| 1561 | if (next == fstart) | 1561 | if (next == fstart) |
|---|
| 1562 | break; | 1562 | break; |
|---|
| | | 1563 | if (a->importprot == PROTprivate && a->getModule() != from) |
|---|
| | | 1564 | if (FuncDeclaration* fd = next->isFuncDeclaration()) |
|---|
| | | 1565 | next = fd->overnext; |
|---|
| 1563 | } | 1566 | } |
|---|
| 1564 | else | 1567 | else |
|---|
| 1565 | { | 1568 | { |
|---|
| 1566 | f = d->isFuncDeclaration(); | 1569 | f = d->isFuncDeclaration(); |
|---|
| 1567 | if (!f) | 1570 | if (!f) |
|---|