Changeset 2740:31105c1fc01d
- Timestamp:
- 01/17/11 09:56:09 (16 months ago)
- Author:
- Wenceslas Godard <wenceslas.godard(at)eads.net>
- Children:
- 2741:eda78acc6b56, 2746:357c8beeaf55
- Branch:
- default
- Tags:
- delivery-airbus-110117
- Message:
-
typing info for translating the case expression (t466)
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r2739
|
r2740
|
|
| 1622 | 1622 | | Exit -> [Ast.Exit, loc] |
| 1623 | 1623 | | Case (e, choices, default) -> |
| 1624 | | [Ast.Case (normalize_exp e, |
| 1625 | | List.map (fun (e,block) -> |
| 1626 | | normalize_exp e, |
| 1627 | | normalize_block ?return_type block) |
| 1628 | | choices, |
| 1629 | | Ada_utils.may (fun x -> normalize_block ?return_type x) |
| 1630 | | default |
| 1631 | | ),loc] |
| | 1624 | let case_exp = normalize_exp e in |
| | 1625 | let (_, case_t) = case_exp in |
| | 1626 | [Ast.Case (case_exp , |
| | 1627 | List.map (fun (e,block) -> |
| | 1628 | normalize_exp e ~expected_type:case_t, |
| | 1629 | normalize_block ?return_type block) |
| | 1630 | choices, |
| | 1631 | Ada_utils.may (fun x -> normalize_block ?return_type x) |
| | 1632 | default |
| | 1633 | ),loc |
| | 1634 | ] |
| 1632 | 1635 | | Block (dp,blk) -> |
| 1633 | 1636 | Sym.enter_context ~desc:"Declare block" gtbl; |
-
|
r2739
|
r2740
|
|
| 70 | 70 | t441 t444 t447 t449 t450 \ |
| 71 | 71 | t454 t455 t456 t457 t458 t459 t460 \ |
| 72 | | t461 t462 t463 t464 t465 |
| | 72 | t461 t462 t463 t464 t465 t466 |
| 73 | 73 | |
| 74 | 74 | include ../common.Makefile |