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

Skip to content

Commit fe6056b

Browse files
committed
C#: Analysis change notes.
1 parent 14147a1 commit fe6056b

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

change-notes/1.21/analysis-csharp.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@
1818
* 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.
1919
* The following QL classes have been added to model C# 8 features:
2020
- Class `IndexExpr` models from end index expressions, for example `^1`
21-
- Class `IsRecursivePatternExpr` models `is` recursive patterns, for example `s is string { Length: 0 }`
21+
- Class `PatternExpr` is an `Expr` that appears in a pattern. It has the new subclasses `DiscardPatternExpr`, `LabeledPatternExpr`, `RecursivePatternExpr`, `TypeAccessPatternExpr`, `TypePatternExpr`, and `VariablePatternExpr`.
22+
- Class `PatternMatch` models a pattern being matched. It has the subclasses `Case` and `IsExpr`.
2223
- Class `PositionalPatternExpr` models position patterns, for example `(int x, int y)`
2324
- Class `PropertyPatternExpr` models property patterns, for example `Length: int len`
2425
- 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 }`
2726
- Class `SwitchCaseExpr` models the arm of a switch expression, for example `(false, false) => true`
2827
- Class `SwitchExpr` models `switch` expressions, for example `(a, b) switch { ... }`
28+
- Classes `IsConstantExpr`, `IsTypeExpr` and `IsPatternExpr` are deprecated in favour of `IsExpr`
29+
- Class `Switch` models both `SwitchExpr` and `SwitchStmt`
30+
- Class `Case` models both `CaseStmt` and `SwitchCaseExpr`
2931

3032
## Changes to autobuilder

0 commit comments

Comments
 (0)