Skip to content

Commit

Permalink
unsuccessful attempt to add type-forward on IsExternalInit to resolve #…
Browse files Browse the repository at this point in the history
  • Loading branch information
mgravell committed Dec 20, 2023
1 parent 1943d95 commit ded4ffe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<!-- Packages only used in the solution, upgrade at will -->
<PackageVersion Include="BenchmarkDotNet" Version="0.13.1" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.0.0-alpha" />
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4-beta1.22362.3" />
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
Expand Down
7 changes: 4 additions & 3 deletions src/StackExchange.Redis/Hacks.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#if !NET5_0_OR_GREATER

#if NET5_0_OR_GREATER
// context: https://github.com/StackExchange/StackExchange.Redis/issues/2619
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.IsExternalInit))]
#else
// To support { get; init; } properties
using System.ComponentModel;

Expand All @@ -8,5 +10,4 @@ namespace System.Runtime.CompilerServices
[EditorBrowsable(EditorBrowsableState.Never)]
internal static class IsExternalInit { }
}

#endif

0 comments on commit ded4ffe

Please sign in to comment.