Skip to content

Commit 9d52fb7

Browse files
authored
Merge pull request #41579 from sharwell/enable-nrt
Enable nullable reference types in projects that do not target netcoreapp3.1
2 parents d8ef80e + 8c72f47 commit 9d52fb7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

eng/targets/Imports.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
This condition will be evaluated multiple times in multi-targeted projects hence need to be careful
2525
to only set in the inner builds, not the outer build where only $(TargetFrameworks) is defined.
2626
-->
27-
<DisableNullableWarnings Condition="'$(DisableNullableWarnings)' == '' AND '$(TargetFramework)' != '' AND '$(TargetFramework)' != 'netcoreapp3.1'">true</DisableNullableWarnings>
27+
<DisableNullableWarnings Condition="'$(DisableNullableWarnings)' == '' AND $(TargetFrameworks.Contains('netcoreapp3.1')) AND '$(TargetFramework)' != '' AND '$(TargetFramework)' != 'netcoreapp3.1'">true</DisableNullableWarnings>
2828
</PropertyGroup>
2929

3030
<PropertyGroup Condition="'$(DisableNullableWarnings)' == 'true'">

src/ExpressionEvaluator/Core/Source/ExpressionCompiler/EEMetadataReferenceResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ internal EEMetadataReferenceResolver(
5050
public override ImmutableArray<PortableExecutableReference> ResolveReference(string reference, string? baseFilePath, MetadataReferenceProperties properties)
5151
=> throw ExceptionUtilities.Unreachable;
5252

53-
public override bool Equals(object other)
53+
public override bool Equals(object? other)
5454
=> throw ExceptionUtilities.Unreachable;
5555

5656
public override int GetHashCode()

src/ExpressionEvaluator/Core/Source/ExpressionCompiler/EvaluationContextBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public override bool Equals(Diagnostic? obj)
155155
throw new NotImplementedException();
156156
}
157157

158-
public override bool Equals(object obj)
158+
public override bool Equals(object? obj)
159159
{
160160
throw new NotImplementedException();
161161
}

0 commit comments

Comments
 (0)