Skip to content

Commit 98d27e8

Browse files
Fix test case to use block bodies instead of expression-bodied members
Co-authored-by: christophwille <[email protected]>
1 parent 4cbf5af commit 98d27e8

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
2222
{
2323
internal class SemiAutoProperties
2424
{
25-
// Semi-auto property with validation in setter
2625
public int ValidatedProperty {
27-
get => field;
26+
get {
27+
return field;
28+
}
2829
set {
2930
if (value < 0)
3031
{
@@ -34,7 +35,6 @@ public int ValidatedProperty {
3435
}
3536
}
3637

37-
// Semi-auto property with lazy initialization
3838
public string LazyProperty {
3939
get {
4040
if (field == null)
@@ -43,12 +43,15 @@ public string LazyProperty {
4343
}
4444
return field;
4545
}
46-
set => field = value;
46+
set {
47+
field = value;
48+
}
4749
}
4850

49-
// Semi-auto property with notification
5051
public int NotifyProperty {
51-
get => field;
52+
get {
53+
return field;
54+
}
5255
set {
5356
if (field != value)
5457
{
@@ -58,7 +61,6 @@ public int NotifyProperty {
5861
}
5962
}
6063

61-
// Getter-only semi-auto property with initialization
6264
public int ReadOnlyWithInit {
6365
get {
6466
if (field == 0)

0 commit comments

Comments
 (0)