Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b28ad90

Browse files
committed
C#: Change notes
1 parent 21203cd commit b28ad90

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

change-notes/1.21/analysis-csharp.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,22 @@
99

1010
## Changes to code extraction
1111

12-
* Named attribute arguments are now extracted.
12+
* The following C# 8 features are now extracted:
13+
- Range expressions
14+
- Recursive patterns
1315

1416
## Changes to QL libraries
1517

1618
* The class `Attribute` has two new predicates: `getConstructorArgument()` and `getNamedArgument()`. The first predicate returns arguments to the underlying constructor call and the latter returns named arguments for initializing fields and properties.
19+
* The following QL classes have been added to model C# 8 features:
20+
- Class `IndexExpr` models from end index expressions, for example `^1`
21+
- Class `IsRecursivePatternExpr` models `is` recursive patterns, for example `s is string { Length: 0 }`
22+
- Class `PositionalPatternExpr` models position patterns, for example `(int x, int y)`
23+
- Class `PropertyPatternExpr` models property patterns, for example `Length: int len`
24+
- Class `RangeExpr` models range expressions, for example `1..^1`
25+
- Class `RecursivePatternCase` models `case` statements using recursive patterns, for example `case string { Length: 0 } x:`
26+
- Class `RecursivePatternExpr` models recursive patterns, for example `string { Length: 0 }`
27+
- Class `SwitchCaseExpr` models the arm of a switch expression, for example `(false, false) => true`
28+
- Class `SwitchExpr` models `switch` expressions, for example `(a, b) switch { ... }`
1729

1830
## Changes to autobuilder

0 commit comments

Comments
 (0)