Swift: extract ConsumeExpr

This commit is contained in:
Alex Denisov
2023-11-13 14:00:13 +01:00
parent 30e4822fb7
commit d21e27c717
20 changed files with 207 additions and 23 deletions

View File

@@ -1338,3 +1338,15 @@ class CopyExpr(Expr):
```
"""
sub_expr: Expr | child
@qltest.test_with(CopyExpr)
class ConsumeExpr(Expr):
"""
An expression that forces value to be moved. In the example below, `consume` marks the move expression:
```
let y = ...
let x = consume y
```
"""
sub_expr: Expr | child