Skip to content

Commit d8ae0af

Browse files
authored
Merge branch 'master' into issue3584
2 parents c37fcac + 7a5a2a0 commit d8ae0af

File tree

21 files changed

+1433
-300
lines changed

21 files changed

+1433
-300
lines changed

.github/workflows/build-ilspy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Install dotnet-format
4747
env:
48-
DOTNET_FORMAT_VERSION: 10.0.100-rc.2.25502.106
48+
DOTNET_FORMAT_VERSION: 10.0.100-rtm.25531.102
4949
DOTNET_FORMAT_SOURCE: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10-transport/nuget/v3/index.json
5050
run: dotnet tool install -g dotnet-format --version "${{env.DOTNET_FORMAT_VERSION}}" --add-source "${{env.DOTNET_FORMAT_SOURCE}}"
5151

BuildTools/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
set -eu
77

8-
DOTNET_FORMAT_VERSION=10.0.100-rc.2.25502.106
8+
DOTNET_FORMAT_VERSION=10.0.100-rtm.25531.102
99
DOTNET_FORMAT_SOURCE="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10-transport/nuget/v3/index.json"
1010
DOTNET_PATH="$LOCALAPPDATA/ICSharpCode/ILSpy/dotnet-format-$DOTNET_FORMAT_VERSION"
1111
if [ ! -d "$DOTNET_PATH" ]; then

Directory.Packages.props

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<ItemGroup>
77
<PackageVersion Include="AvalonEdit" Version="6.3.1.120" />
88
<PackageVersion Include="CliWrap" Version="3.9.0" />
9-
<PackageVersion Include="DataGridExtensions" Version="2.7.0" />
9+
<PackageVersion Include="DataGridExtensions" Version="2.8.0" />
1010
<PackageVersion Include="DiffLib" Version="2025.0.0" />
1111
<PackageVersion Include="Dirkster.AvalonDock.Themes.VS2013" Version="4.72.1" />
12-
<PackageVersion Include="ILCompiler.Reflection.ReadyToRun.Experimental" Version="10.0.0-rc.2.25502.106" />
12+
<PackageVersion Include="ILCompiler.Reflection.ReadyToRun.Experimental" Version="10.0.0-rtm.25531.102" />
1313
<PackageVersion Include="Iced" Version="1.21.0" />
1414
<PackageVersion Include="K4os.Compression.LZ4" Version="1.3.8" />
1515
<PackageVersion Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
@@ -19,17 +19,17 @@
1919
<PackageVersion Include="Microsoft.DiaSymReader.Converter.Xml" Version="1.1.0-beta2-22171-02" />
2020
<PackageVersion Include="Microsoft.DiaSymReader" Version="1.4.0" />
2121
<PackageVersion Include="Microsoft.DiaSymReader.Native" Version="17.0.0-beta1.21524.1" />
22-
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.0-rc.2.25502.107" />
23-
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="10.0.0-rc.2.25502.107" />
24-
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.0-rc.2.25502.107" />
25-
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="10.0.0-rc.2.25502.107" />
22+
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.0" />
23+
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="10.0.0" />
24+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.0" />
25+
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="10.0.0" />
2626
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
27-
<PackageVersion Include="Microsoft.NETCore.ILAsm" Version="10.0.0-rc.2.25502.107" />
28-
<PackageVersion Include="Microsoft.NETCore.ILDAsm" Version="10.0.0-rc.2.25502.107" />
29-
<PackageVersion Include="Microsoft.Sbom.Targets" Version="4.1.2" />
27+
<PackageVersion Include="Microsoft.NETCore.ILAsm" Version="10.0.0" />
28+
<PackageVersion Include="Microsoft.NETCore.ILDAsm" Version="10.0.0" />
29+
<PackageVersion Include="Microsoft.Sbom.Targets" Version="4.1.3" />
3030
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
31-
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="1.9.0" />
32-
<PackageVersion Include="Microsoft.Testing.Extensions.VSTestBridge" Version="1.9.0" />
31+
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="1.9.1" />
32+
<PackageVersion Include="Microsoft.Testing.Extensions.VSTestBridge" Version="1.9.1" />
3333
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" />
3434
<PackageVersion Include="Mono.Cecil" Version="0.11.6" />
3535
<PackageVersion Include="NSubstitute" Version="5.3.0" />
@@ -39,13 +39,13 @@
3939
<PackageVersion Include="NuGet.Protocol" Version="6.14.0" />
4040
<PackageVersion Include="PowerShellStandard.Library" Version="5.1.1" />
4141
<PackageVersion Include="Shouldly" Version="4.3.0" />
42-
<PackageVersion Include="System.Composition.AttributedModel" Version="10.0.0-rc.2.25502.107" />
43-
<PackageVersion Include="System.Collections.Immutable" Version="10.0.0-rc.2.25502.107" />
42+
<PackageVersion Include="System.Composition.AttributedModel" Version="10.0.0" />
43+
<PackageVersion Include="System.Collections.Immutable" Version="10.0.0" />
4444
<PackageVersion Include="System.Memory" Version="4.6.3" />
45-
<PackageVersion Include="System.Reflection.Metadata" Version="10.0.0-rc.2.25502.107" />
46-
<PackageVersion Include="System.Resources.Extensions" Version="10.0.0-rc.2.25502.107" />
45+
<PackageVersion Include="System.Reflection.Metadata" Version="10.0.0" />
46+
<PackageVersion Include="System.Resources.Extensions" Version="10.0.0" />
4747
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.2" />
48-
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="9.0.9" />
48+
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="10.0.0" />
4949
<PackageVersion Include="TomsToolbox.Composition.MicrosoftExtensions" Version="2.22.2" />
5050
<PackageVersion Include="TomsToolbox.Wpf.Composition" Version="2.22.2" />
5151
<PackageVersion Include="TomsToolbox.Wpf.Composition.AttributedModel" Version="2.22.2" />

ICSharpCode.BamlDecompiler/packages.lock.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"net10.0": {
55
"Microsoft.Sbom.Targets": {
66
"type": "Direct",
7-
"requested": "[4.1.2, )",
8-
"resolved": "4.1.2",
9-
"contentHash": "AmGCBhWtWu1d1PCit6WTdmpq48nPmmnJz9zZFBsxoCjYZjjZ0Gjm+wuAzHzVMF8VmTo/NeDGi2C73969QXiryw=="
7+
"requested": "[4.1.3, )",
8+
"resolved": "4.1.3",
9+
"contentHash": "ItQp7LZ5irnDYoyYkxOxuik9mULFviFQOgGJ1j5A7a2EAJK9bidT1aT65xg48Opcjao/BKJWOtJUnik2g3grLg=="
1010
},
1111
"TomsToolbox.Composition.Analyzer": {
1212
"type": "Direct",
@@ -23,13 +23,13 @@
2323
},
2424
"System.Collections.Immutable": {
2525
"type": "CentralTransitive",
26-
"requested": "[10.0.0-rc.2.25502.107, )",
26+
"requested": "[10.0.0, )",
2727
"resolved": "9.0.0",
2828
"contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w=="
2929
},
3030
"System.Reflection.Metadata": {
3131
"type": "CentralTransitive",
32-
"requested": "[10.0.0-rc.2.25502.107, )",
32+
"requested": "[10.0.0, )",
3333
"resolved": "9.0.0",
3434
"contentHash": "ANiqLu3DxW9kol/hMmTWbt3414t9ftdIuiIU7j80okq2YzAueo120M442xk1kDJWtmZTqWQn7wHDvMRipVOEOQ=="
3535
}

ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@
164164
<Compile Include="TestCases\Pretty\Issue3571_A.cs" />
165165
<Compile Include="TestCases\Pretty\Issue3576.cs" />
166166
<Compile Include="TestCases\Pretty\Issue3584.cs" />
167+
<Compile Include="TestCases\Pretty\PlaystationPreferPrimary.cs" />
168+
<Compile Include="TestCases\Pretty\Playstation.cs" />
167169
<None Include="TestCases\Ugly\NoLocalFunctions.Expected.cs" />
168170
<None Include="TestCases\ILPretty\Issue3504.cs" />
169171
<Compile Include="TestCases\ILPretty\MonoFixed.cs" />

ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,22 @@ public async Task Records([ValueSource(nameof(roslyn3OrNewerOptions))] CompilerO
535535
await RunForLibrary(cscOptions: cscOptions | CompilerOptions.NullableEnable);
536536
}
537537

538+
[Test]
539+
public async Task Playstation([ValueSource(nameof(roslyn4OrNewerOptions))] CompilerOptions cscOptions)
540+
{
541+
// see https://github.com/icsharpcode/ILSpy/pull/3598#issuecomment-3465151525
542+
await RunForLibrary(cscOptions: cscOptions | CompilerOptions.NullableEnable);
543+
}
544+
545+
[Test]
546+
public async Task PlaystationPreferPrimary([ValueSource(nameof(roslyn4OrNewerOptions))] CompilerOptions cscOptions)
547+
{
548+
// see https://github.com/icsharpcode/ILSpy/pull/3598#issuecomment-3465151525
549+
await RunForLibrary(cscOptions: cscOptions | CompilerOptions.NullableEnable, configureDecompiler: settings => {
550+
settings.PreferPrimaryConstructorIfPossible = true;
551+
});
552+
}
553+
538554
[Test]
539555
public async Task ExtensionProperties([ValueSource(nameof(roslyn4OrNewerOptions))] CompilerOptions cscOptions)
540556
{

ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,18 @@ public void Print()
127127
}
128128
}
129129

130+
131+
132+
public class ClassWithPrimaryCtorUsingGlobalParameterInExpressionAssignedToProperty(int a)
133+
{
134+
public int A { get; set; } = (int)Math.Abs(Math.PI * (double)a);
135+
136+
public void Print()
137+
{
138+
Console.WriteLine(A);
139+
}
140+
}
141+
130142
public class ClassWithPrimaryCtorUsingGlobalParameterAssignedToEvent(EventHandler a)
131143
{
132144
public event EventHandler A = a;

0 commit comments

Comments
 (0)