Skip to content

Commit 62edb70

Browse files
committed
Enable nullable for project
1 parent 9f195c9 commit 62edb70

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<OutputPath>$(BinFolder)$(Configuration).$(Platform).$(AssemblyName)</OutputPath>
99
<IsTestProject>true</IsTestProject>
1010
<GenerateDocumentationFile>true</GenerateDocumentationFile>
11+
<Nullable>enable</Nullable>
1112
</PropertyGroup>
1213
<!-- Common references -->
1314
<ItemGroup>

src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/UdtSerialization/SerializedTypes.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ internal class NestedBoolWrapperClass { public bool Field1; public BoolWrapperSt
187187
// Failure case: a struct or a class containing one designated primitive type and a nested class
188188
[SqlUserDefinedType(Format.Native)]
189189
[StructLayout(LayoutKind.Sequential)]
190-
internal class InvalidNestedBoolWrapperClass { public bool Field1; public BoolWrapperClass Field2; }
190+
internal class InvalidNestedBoolWrapperClass { public bool Field1; public BoolWrapperClass? Field2; }
191191

192192
// Failure case: a struct or a class containing a field which is not a designated primitive type
193193
[SqlUserDefinedType(Format.Native)]
@@ -302,7 +302,7 @@ public void Write(BinaryWriter w)
302302
WriteInvoked = true;
303303
}
304304

305-
public bool Equals(UserDefinedFormattedClass other)
305+
public bool Equals(UserDefinedFormattedClass? other)
306306
=> other is not null && other.Field1 == Field1;
307307
}
308308

0 commit comments

Comments
 (0)