-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed #1068 (NullableAttribute)
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
Source/Mosa.Korlib/System.Runtime.CompilerServices/NullableAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
//using System.ComponentModel; | ||
|
||
namespace System.Runtime.CompilerServices | ||
{ | ||
/// <summary> | ||
/// Reserved for use by a compiler for tracking metadata. | ||
/// This attribute should not be used by developers in source code. | ||
/// </summary> | ||
//[EditorBrowsable(EditorBrowsableState.Never)] | ||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, Inherited = false)] | ||
public sealed class NullableAttribute : Attribute | ||
{ | ||
/// <summary>Flags specifying metadata related to nullable reference types.</summary> | ||
public readonly byte[] NullableFlags; | ||
|
||
/// <summary>Initializes the attribute.</summary> | ||
/// <param name="value">The flags value.</param> | ||
public NullableAttribute(byte value) | ||
{ | ||
NullableFlags = new[] { value }; | ||
} | ||
|
||
/// <summary>Initializes the attribute.</summary> | ||
/// <param name="value">The flags value.</param> | ||
public NullableAttribute(byte[] value) | ||
{ | ||
NullableFlags = value; | ||
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters