Skip to content

Commit c054b12

Browse files
authored
Allow yield return in lock
1 parent 89bf131 commit c054b12

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

docs/csharp/language-reference/compiler-messages/iterator-yield.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ f1_keywords:
1313
- "CS4013"
1414
- "CS8154"
1515
- "CS8176"
16-
- "CS9237"
1716
- "CS9238"
1817
- "CS9239"
1918
helpviewer_keywords:
@@ -28,7 +27,6 @@ helpviewer_keywords:
2827
- "CS4013"
2928
- "CS8154"
3029
- "CS8176"
31-
- "CS9237"
3230
- "CS9238"
3331
- "CS9239"
3432
ms.date: 07/02/2024
@@ -51,7 +49,6 @@ That's by design. The text closely matches the text of the compiler error / warn
5149
- [**CS4013**](#ref-safety-in-iterator-methods): *Instance of type cannot be used inside a nested function, query expression, iterator block or async method*
5250
- [**CS8154**](#structure-of-an-iterator-method): *The body cannot be an iterator block because it returns by reference*
5351
- [**CS8176**](#ref-safety-in-iterator-methods): *Iterators cannot have by-reference locals*
54-
- [**CS9237**](#restrictions-on-iterator-methods): *'yield return' should not be used in the body of a lock statement*
5552
- [**CS9238**](#restrictions-on-iterator-methods): *Cannot use 'yield return' in an 'unsafe' block*
5653
- [**CS9239**](#restrictions-on-iterator-methods): *The `&` operator cannot be used on parameters or local variables in iterator methods.*
5754

@@ -82,7 +79,6 @@ The body of an iterator method must conform to restrictions on the `yield return
8279
- **CS1626**: *Cannot yield a value in the body of a try block with a catch clause*
8380
- **CS1631**: *Cannot yield a value in the body of a catch clause*
8481
- **CS1629**: *Unsafe code may not appear in iterators*
85-
- **CS9237**: *''yield return' should not be used in the body of a lock statement*
8682
- **CS9238**: *Cannot use 'yield return' in an 'unsafe' block*
8783
- **CS9239**: *The `&` operator cannot be used on parameters or local variables in iterator methods.*
8884

0 commit comments

Comments
 (0)