Skip to content

Commit ffb8299

Browse files
Test case
1 parent 7ea2c8f commit ffb8299

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<PropertyGroup>
1010
<TargetFramework>net10.0-windows</TargetFramework>
11-
<LangVersion>13</LangVersion>
11+
<LangVersion>preview</LangVersion>
1212
<RuntimeIdentifier Condition="$(IsWindowsX64) == true">win-x64</RuntimeIdentifier>
1313
<RuntimeIdentifier Condition="$(IsWindowsARM64) == true">win-arm64</RuntimeIdentifier>
1414

@@ -146,6 +146,7 @@
146146
<Compile Include="TestCases\ILPretty\Issue3442.cs" />
147147
<Compile Include="TestCases\ILPretty\Issue3466.cs" />
148148
<Compile Include="TestCases\ILPretty\Issue3524.cs" />
149+
<Compile Include="TestCases\Pretty\ExtensionProperties.cs" />
149150
<None Include="TestCases\ILPretty\Issue3504.cs" />
150151
<Compile Include="TestCases\ILPretty\MonoFixed.cs" />
151152
<Compile Include="TestCases\Pretty\Comparisons.cs" />

ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,12 @@ public async Task Records([ValueSource(nameof(roslyn3OrNewerOptions))] CompilerO
527527
await RunForLibrary(cscOptions: cscOptions | CompilerOptions.NullableEnable);
528528
}
529529

530+
[Test]
531+
public async Task ExtensionProperties([ValueSource(nameof(roslyn4OrNewerOptions))] CompilerOptions cscOptions)
532+
{
533+
await RunForLibrary(cscOptions: cscOptions | CompilerOptions.Preview);
534+
}
535+
530536
[Test]
531537
public async Task NullPropagation([ValueSource(nameof(roslynOnlyOptions))] CompilerOptions cscOptions)
532538
{
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System.Collections.Generic;
2+
3+
namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
4+
{
5+
static class ExtensionProperties
6+
{
7+
extension<T>(ICollection<T> collection)
8+
{
9+
public bool IsEmpty => collection.Count == 0;
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)