Changeset 780:2cf440d511bb
- Timestamp:
- 11/22/08 12:45:09
(2 months ago)
- Author:
- Christian Kamm <kamm incasoftware de>
- branch:
- default
- Message:
Move tuple syntax copy for function arguments after semantic, to make sure
->ty contains the final value. Fixes run/t/tuple_20_A again.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r772 |
r780 |
|
| 2952 | 2952 | Type *t; |
|---|
| 2953 | 2953 | |
|---|
| 2954 | | // each function needs its own copy of a tuple arg, since |
|---|
| 2955 | | // they mustn't share arg flags like inreg, ... |
|---|
| 2956 | | if (arg->type->ty == Ttuple) |
|---|
| 2957 | | arg->type = arg->type->syntaxCopy(); |
|---|
| 2958 | | |
|---|
| 2959 | 2954 | tf->inuse++; |
|---|
| 2960 | 2955 | arg->type = arg->type->semantic(loc,sc); |
|---|
| 2961 | 2956 | if (tf->inuse == 1) tf->inuse--; |
|---|
| | 2957 | |
|---|
| | 2958 | // each function needs its own copy of a tuple arg, since |
|---|
| | 2959 | // they mustn't share arg flags like inreg, ... |
|---|
| | 2960 | if (arg->type->ty == Ttuple) { |
|---|
| | 2961 | arg->type = arg->type->syntaxCopy(); |
|---|
| | 2962 | tf->inuse++; |
|---|
| | 2963 | arg->type = arg->type->semantic(loc,sc); |
|---|
| | 2964 | if (tf->inuse == 1) tf->inuse--; |
|---|
| | 2965 | } |
|---|
| | 2966 | |
|---|
| 2962 | 2967 | t = arg->type->toBasetype(); |
|---|
| 2963 | 2968 | |
|---|