Skip to content

Commit bbb0e11

Browse files
[create-pull-request] automated change (#732)
Co-authored-by: RexJaeschke <[email protected]>
1 parent e41690c commit bbb0e11

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

standard/classes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,11 +444,11 @@ The value type constraint specifies that a type argument used for the type param
444444

445445
> *Note*: The `System.Nullable<T>` type specifies the non-nullable value type constraint for `T`. Thus, recursively constructed types of the forms `T??` and `Nullable<Nullable<T>>` are prohibited. *end note*
446446
447-
Because `unmanaged` is not a keyword, in *primary_constraint* the unmanaged constraint is always syntactically ambiguous with *class_type*. For compatibility reasons, if a name lookup (§11.7.4) of the name `unmanaged` succeeds it is treated as a `class_type`. Otherwise it is treated as the unmanaged constraint.
447+
Because `unmanaged` is not a keyword, in *primary_constraint* the unmanaged constraint is always syntactically ambiguous with *class_type*. For compatibility reasons, if a name lookup ([§11.7.4](expressions.md#1174-simple-names)) of the name `unmanaged` succeeds it is treated as a `class_type`. Otherwise it is treated as the unmanaged constraint.
448448

449449
The unmanaged type constraint specifies that a type argument used for the type parameter shall be a non-nullable unmanaged type ([§8.8](types.md#88-unmanaged-types)).
450450

451-
Pointer types are never allowed to be type arguments, and don't satisfy any type constraints, even unmanaged, despite being unmanaged types.
451+
Pointer types are never allowed to be type arguments, and dont satisfy any type constraints, even unmanaged, despite being unmanaged types.
452452

453453
If a constraint is a class type, an interface type, or a type parameter, that type specifies a minimal “base type” that every type argument used for that type parameter shall support. Whenever a constructed type or generic method is used, the type argument is checked against the constraints on the type parameter at compile-time. The type argument supplied shall satisfy the conditions described in [§8.4.5](types.md#845-satisfying-constraints).
454454

standard/grammar.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,12 @@ keyword
207207
208208
// Source: §6.4.4 Keywords
209209
contextual_keyword
210-
: 'add' | 'alias' | 'ascending' | 'async' | 'await'
211-
| 'by' | 'descending' | 'dynamic' | 'equals' | 'from'
212-
| 'get' | 'global' | 'group' | 'into' | 'join'
213-
| 'let' | 'nameof' | 'on' | 'orderby' | 'partial'
214-
| 'remove' | 'select' | 'set' | 'value' | 'var'
215-
| 'when' | 'where' | 'yield'
210+
: 'add' | 'alias' | 'ascending' | 'async' | 'await'
211+
| 'by' | 'descending' | 'dynamic' | 'equals' | 'from'
212+
| 'get' | 'global' | 'group' | 'into' | 'join'
213+
| 'let' | 'nameof' | 'on' | 'orderby' | 'partial'
214+
| 'remove' | 'select' | 'set' | 'unmanaged' | 'value'
215+
| 'var' | 'when' | 'where' | 'yield'
216216
;
217217
218218
// Source: §6.4.5.1 General
@@ -1804,6 +1804,7 @@ primary_constraint
18041804
: class_type
18051805
| 'class'
18061806
| 'struct'
1807+
| 'unmanaged'
18071808
;
18081809
18091810
secondary_constraints

0 commit comments

Comments
 (0)