8000 Enable nullable for `System.Management.Automation.Language.ITypeName`… · rkeithhill/PowerShell@ff2f4d8 · GitHub
[go: up one dir, main page]

Skip to content

Commit ff2f4d8

Browse files
powercoderkeithhill
authored andcommitted
Enable nullable for System.Management.Automation.Language.ITypeName (PowerShell#14181)
1 parent ccb5b61 commit ff2f4d8

File tree

1 file changed

+5
-3
lines changed
  • src/System.Management.Automation/engine/parser

1 file changed

+5
-3
lines changed

src/System.Management.Automation/engine/parser/ast.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8139,6 +8139,7 @@ internal override object Accept(ICustomAstVisitor visitor)
81398139
/// <summary>
81408140
/// The name and attributes of a type.
81418141
/// </summary>
8142+
#nullable enable
81428143
public interface ITypeName
81438144
{
81448145
/// <summary>
@@ -8154,7 +8155,7 @@ public interface ITypeName
81548155
/// <summary>
81558156
/// The name of the assembly, if specified, otherwise null.
81568157
/// </summary>
8157-
string AssemblyName { get; }
8158+
string? AssemblyName { get; }
81588159

81598160
/// <summary>
81608161
/// Returns true if the type names an array, false otherwise.
@@ -8169,20 +8170,21 @@ public interface ITypeName
81698170
/// <summary>
81708171
/// Returns the <see cref="System.Type"/> that this typename represents, if such a type exists, null otherwise.
81718172
/// </summary>
8172-
Type GetReflectionType();
8173+
Type? GetReflectionType();
81738174

81748175
/// <summary>
81758176
/// Assuming the typename is an attribute, returns the <see cref="System.Type"/> that this typename represents.
81768177
/// By convention, the typename may omit the suffix "Attribute". Lookup will attempt to resolve the type as is,
81778178
/// and if that fails, the suffix "Attribute" will be appended.
81788179
/// </summary>
8179-
Type GetReflectionAttributeType();
8180+
Type? GetReflectionAttributeType();
81808181

81818182
/// <summary>
81828183
/// The extent of the typename.
81838184
/// </summary>
81848185
IScriptExtent Extent { get; }
81858186
}
8187+
#nullable restore
81868188

81878189
#nullable enable
81888190
internal interface ISupportsTypeCaching

0 commit comments

Comments
 (0)
0