Skip to content

Commit 30c187c

Browse files
committed
Fix compilation errors in tests
1 parent ee32ccb commit 30c187c

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

tests/MemoryPack.Tests/MemoryPack.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<IsPackable>false</IsPackable>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

tests/MemoryPack.Tests/Models/DefaultValues.cs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,21 @@ partial class PropertyDefaultValue
2727
}
2828

2929
[MemoryPackable]
30-
[method: MemoryPackConstructor]
31-
partial class CtorParamDefaultValue(int x, int y = 12345, float z = 678.9f, string s = "aaaaaa", bool b = true)
30+
partial class CtorParamDefaultValue
3231
{
33-
public int X = x;
34-
public int Y = y;
35-
public float Z = z;
36-
public string S = s;
37-
public bool B = b;
32+
public int X;
33+
public int Y;
34+
public float Z;
35+
public string S;
36+
public bool B;
37+
38+
[MemoryPackConstructor]
39+
public CtorParamDefaultValue(int x, int y = 12345, float z = 678.9f, string s = "aaaaaa", bool b = true)
40+
{
41+
X = x;
42+
Y = y;
43+
Z = z;
44+
S = s;
45+
B = b;
46+
}
3847
}

0 commit comments

Comments
 (0)