Skip to content

Commit f2dd376

Browse files
committed
Update restrictions on parameters
Fixes #896.
1 parent c10ea73 commit f2dd376

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

standard/variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,8 +1224,8 @@ A `new` expression that invokes a constructor obeys the same rules as a method i
12241224
12251225
#### 9.7.2.9 Limitations on reference variables
12261226
1227-
- Neither a `ref` parameter, nor a `ref` local, nor a parameter or local of a `ref struct` type shall be captured by lambda expression or local function.
1228-
- Neither a `ref` parameter nor a parameter of a `ref struct` type shall be an argument for an iterator method or an `async` method.
1227+
- Neither a reference parameter, nor an output parameter, nor an input parameter, nor a `ref` local, nor a parameter or local of a `ref struct` type shall be captured by lambda expression or local function.
1228+
- Neither a reference parameter, nor an output parameter, nor an input parameter, nor a parameter of a `ref struct` type shall be an argument for an iterator method or an `async` method.
12291229
- Neither a `ref` local, nor a local of a `ref struct` type shall be in context at the point of a `yield return` statement or an `await` expression.
12301230
- For a ref reassignment `e1 = ref e2`, the ref-safe-context of `e2` must be at least as wide a context as the *ref-safe-context* of `e1`.
12311231
- For a ref return statement `return ref e1`, the ref-safe-context of `e1` must be the caller-context.

0 commit comments

Comments
 (0)