Skip to content

Commit

Permalink
Merge pull request #1658 from bbarry/patch-4
Browse files Browse the repository at this point in the history
abstract/virtual parameters use InAttribute
  • Loading branch information
jaredpar committed Aug 10, 2018
2 parents 00ed94d + c26d848 commit ee3d124
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proposals/csharp-7.2/readonly-ref.md
Expand Up @@ -259,7 +259,7 @@ The formal life time of temporary variables is semantically significant in scena
## Metadata representation of `in` parameters.
When `System.Runtime.CompilerServices.IsReadOnlyAttribute` is applied to a byref parameter, it means that the the parameter is an `in` parameter.

In addition, if the method is *abstract* or *virtual*, then the signature of such parameters (and only such parameters) must have `modreq[System.Runtime.CompilerServices.IsReadOnlyAttribute]`.
In addition, if the method is *abstract* or *virtual*, then the signature of such parameters (and only such parameters) must have `modreq[System.Runtime.InteropServices.InAttribute]`.

**Motivation**: this is done to ensure that in a case of method overriding/implementing the `in` parameters match.

Expand Down

0 comments on commit ee3d124

Please sign in to comment.