Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Version.Details.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This file should be imported by eng/Versions.props
<MicrosoftCodeAnalysisPackageVersion>3.11.0</MicrosoftCodeAnalysisPackageVersion>
<MicrosoftNetCompilersToolsetPackageVersion>4.10.0-1.24061.4</MicrosoftNetCompilersToolsetPackageVersion>
<!-- dotnet/dotnet dependencies -->
<SystemCommandLinePackageVersion>2.0.0-rc.2.25464.104</SystemCommandLinePackageVersion>
<SystemCommandLinePackageVersion>2.0.0-rc.2.25465.104</SystemCommandLinePackageVersion>
<!-- dotnet/runtime dependencies -->
<MicrosoftBclAsyncInterfacesPackageVersion>9.0.0</MicrosoftBclAsyncInterfacesPackageVersion>
<MicrosoftExtensionsConfigurationPackageVersion>9.0.0</MicrosoftExtensionsConfigurationPackageVersion>
Expand Down
6 changes: 3 additions & 3 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<Source Uri="https://github.com/dotnet/dotnet" Mapping="roslyn" Sha="87cc9e9aebf530502d4450dd9b4682b8caa722b2" BarId="283152" />
<Source Uri="https://github.com/dotnet/dotnet" Mapping="roslyn" Sha="b067b59875bd4e4764cf04360970b3dea36bb47e" BarId="283288" />
<ProductDependencies>
<!-- RoslynAnalyzers reference older builds of Roslyn and this is necessary for SourceBuild. -->
<Dependency Name="Microsoft.CodeAnalysis" Version="3.11.0">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>ae1fff344d46976624e68ae17164e0607ab68b10</Sha>
</Dependency>
<Dependency Name="System.CommandLine" Version="2.0.0-rc.2.25464.104">
<Dependency Name="System.CommandLine" Version="2.0.0-rc.2.25465.104">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>87cc9e9aebf530502d4450dd9b4682b8caa722b2</Sha>
<Sha>b067b59875bd4e4764cf04360970b3dea36bb47e</Sha>
</Dependency>
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
<Dependency Name="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ TypeKind ITypeSymbol.TypeKind

bool ITypeSymbol.IsNativeIntegerType => UnderlyingTypeSymbol.IsNativeIntegerType;

#nullable enable
bool ITypeSymbol.IsExtension => UnderlyingTypeSymbol.IsExtension;

IParameterSymbol? ITypeSymbol.ExtensionParameter => UnderlyingTypeSymbol.ExtensionParameter?.GetPublicSymbol();
#nullable disable

string ITypeSymbol.ToDisplayString(CodeAnalysis.NullableFlowState topLevelNullability, SymbolDisplayFormat format)
{
return SymbolDisplay.ToDisplayString(this, topLevelNullability, format);
Expand Down
2 changes: 2 additions & 0 deletions src/Compilers/Core/Portable/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ Microsoft.CodeAnalysis.IEventSymbol.PartialImplementationPart.get -> Microsoft.C
Microsoft.CodeAnalysis.IncrementalGeneratorPostInitializationContext.AddEmbeddedAttributeDefinition() -> void
Microsoft.CodeAnalysis.RuntimeCapability.RuntimeAsyncMethods = 9 -> Microsoft.CodeAnalysis.RuntimeCapability
override Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.ToString() -> string!
Microsoft.CodeAnalysis.ITypeSymbol.IsExtension.get -> bool
Microsoft.CodeAnalysis.TypeKind.Extension = 14 -> Microsoft.CodeAnalysis.TypeKind
Microsoft.CodeAnalysis.ITypeSymbol.ExtensionParameter.get -> Microsoft.CodeAnalysis.IParameterSymbol?
const Microsoft.CodeAnalysis.WellKnownMemberNames.AdditionAssignmentOperatorName = "op_AdditionAssignment" -> string!
const Microsoft.CodeAnalysis.WellKnownMemberNames.BitwiseAndAssignmentOperatorName = "op_BitwiseAndAssignment" -> string!
const Microsoft.CodeAnalysis.WellKnownMemberNames.BitwiseOrAssignmentOperatorName = "op_BitwiseOrAssignment" -> string!
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/Core/Portable/Symbols/INamedTypeSymbol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ public interface INamedTypeSymbol : ITypeSymbol
/// <summary>
/// Is this a symbol for an extension declaration.
/// </summary>
bool IsExtension { get; }
new bool IsExtension { get; }

/// <summary>
/// The extension parameter if this is an extension declaration (<see cref="IsExtension"/> is true).
/// Note: this may be null even if <see cref="IsExtension"/> is true, in error cases.
/// </summary>
IParameterSymbol? ExtensionParameter { get; }
new IParameterSymbol? ExtensionParameter { get; }
}
}
6 changes: 6 additions & 0 deletions src/Compilers/Core/Portable/Symbols/ITypeSymbol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ public interface ITypeSymbol : INamespaceOrTypeSymbol
/// </summary>
bool IsNativeIntegerType { get; }

[Obsolete($"This API will be removed in the future. Use {nameof(INamedTypeSymbol)}.{nameof(INamedTypeSymbol.IsExtension)} instead.")]
bool IsExtension { get; }

[Obsolete($"This API will be removed in the future. Use {nameof(INamedTypeSymbol)}.{nameof(INamedTypeSymbol.ExtensionParameter)} instead.")]
IParameterSymbol? ExtensionParameter { get; }

/// <summary>
/// The original definition of this symbol. If this symbol is constructed from another
/// symbol by type substitution then <see cref="OriginalDefinition"/> gets the original symbol as it was defined in
Expand Down
14 changes: 14 additions & 0 deletions src/Compilers/VisualBasic/Portable/Symbols/TypeSymbol.vb
Original file line number Diff line number Diff line change
Expand Up @@ -782,5 +782,19 @@ Done:
Private Function ITypeSymbolInternal_GetITypeSymbol() As ITypeSymbol Implements ITypeSymbolInternal.GetITypeSymbol
Return Me
End Function

<Obsolete>
Private ReadOnly Property ITypeSymbol_IsExtension As Boolean Implements ITypeSymbol.IsExtension
Get
Return False
End Get
End Property

<Obsolete>
Private ReadOnly Property ITypeSymbol_ExtensionParameter As IParameterSymbol Implements ITypeSymbol.ExtensionParameter
Get
Return Nothing
End Get
End Property
End Class
End Namespace
Original file line number Diff line number Diff line change
Expand Up @@ -1476,8 +1476,10 @@ Microsoft.CodeAnalysis.ITypeSymbol.ToMinimalDisplayString(Microsoft.CodeAnalysis
Microsoft.CodeAnalysis.ITypeSymbol.WithNullableAnnotation(Microsoft.CodeAnalysis.NullableAnnotation)
Microsoft.CodeAnalysis.ITypeSymbol.get_AllInterfaces
Microsoft.CodeAnalysis.ITypeSymbol.get_BaseType
Microsoft.CodeAnalysis.ITypeSymbol.get_ExtensionParameter
Microsoft.CodeAnalysis.ITypeSymbol.get_Interfaces
Microsoft.CodeAnalysis.ITypeSymbol.get_IsAnonymousType
Microsoft.CodeAnalysis.ITypeSymbol.get_IsExtension
Microsoft.CodeAnalysis.ITypeSymbol.get_IsNativeIntegerType
Microsoft.CodeAnalysis.ITypeSymbol.get_IsReadOnly
Microsoft.CodeAnalysis.ITypeSymbol.get_IsRecord
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ public ImmutableArray<INamedTypeSymbol> AllInterfaces

public bool IsNativeIntegerType => false;

#if !ROSLYN_4_12_OR_LOWER
bool ITypeSymbol.IsExtension => false;

IParameterSymbol ITypeSymbol.ExtensionParameter => null;
#endif

public static ImmutableArray<ITypeSymbol> TupleElementTypes => default;

public static ImmutableArray<string> TupleElementNames => default;
Expand Down