diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-10-17 17:01:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-17 17:01:22 +0300 |
commit | e5721bbb233460d00119db7422b1613a299d81e4 (patch) | |
tree | 36223f7fc4fa8beaa2ebb40b5b944c7e40eb85f6 /mcs/class/referencesource | |
parent | ec653e70bfaba99e9fd88ceb3ff475eda83cb8f1 (diff) |
[corlib] Mark YieldAwaitable struct readonly (#17386)mlir
* [corlib] Mark YieldAwaitable struct readonly
Make it consistent with .NET Standard/Core which makes future API Compat runs report one less difference.
* Bump API snapshot submodule
Diffstat (limited to 'mcs/class/referencesource')
-rw-r--r-- | mcs/class/referencesource/mscorlib/system/runtime/compilerservices/YieldAwaitable.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/YieldAwaitable.cs b/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/YieldAwaitable.cs index 9a0d1f5aed9..08b6de8ceb8 100644 --- a/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/YieldAwaitable.cs +++ b/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/YieldAwaitable.cs @@ -42,7 +42,7 @@ namespace System.Runtime.CompilerServices /// <summary>Provides an awaitable context for switching into a target environment.</summary> /// <remarks>This type is intended for compiler use only.</remarks> - public struct YieldAwaitable + public readonly struct YieldAwaitable { /// <summary>Gets an awaiter for this <see cref="YieldAwaitable"/>.</summary> /// <returns>An awaiter for this awaitable.</returns> @@ -52,7 +52,7 @@ namespace System.Runtime.CompilerServices /// <summary>Provides an awaiter that switches into a target environment.</summary> /// <remarks>This type is intended for compiler use only.</remarks> [HostProtection(Synchronization = true, ExternalThreading = true)] - public struct YieldAwaiter : ICriticalNotifyCompletion + public readonly struct YieldAwaiter : ICriticalNotifyCompletion { /// <summary>Gets whether a yield is not required.</summary> /// <remarks>This property is intended for compiler user rather than use directly in code.</remarks> |