Skip to content

Commit ffbbfd2

Browse files
committed
corrections to self-use
1 parent 7b1afe0 commit ffbbfd2

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

FSharp.Profiles.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -->
33
<Project>
44
<PropertyGroup>
5-
<!-- This turns on/off the feature in FSharp.Core. -->
6-
<CheckNulls>false</CheckNulls>
5+
<!-- This turns on/off the use of the feature within the codebase -->
6+
<!-- The default is off - it is selectively enabled -->
7+
<CheckNulls Condition="'$(CheckNulls)' == ''">false</CheckNulls>
78
</PropertyGroup>
89

910
<PropertyGroup Condition="'$(FSHARPCORE_USE_PACKAGE)' == 'true'">

src/Compiler/FSharp.Compiler.Service.fsproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<AssemblyName>FSharp.Compiler.Service</AssemblyName>
1414
<AllowCrossTargeting>true</AllowCrossTargeting>
1515
<DefineConstants>$(DefineConstants);COMPILER</DefineConstants>
16-
<CheckNulls>true</CheckNulls>
1716
<DefineConstants Condition="'$(FSHARPCORE_USE_PACKAGE)' == 'true'">$(DefineConstants);FSHARPCORE_USE_PACKAGE</DefineConstants>
1817
<OtherFlags>$(OtherFlags) --extraoptimizationloops:1</OtherFlags>
1918
<!-- 1182: Unused variables -->

src/Compiler/TypedTree/TypeProviders.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ let ValidateExpectedName m expectedPath expectedName (st: Tainted<ProvidedType>)
11221122
#if NO_CHECKNULLS
11231123
let namespaceName = TryTypeMember(st, name, "Namespace", m, "", fun st -> st.Namespace) |> unmarshal
11241124
#else
1125-
let namespaceName = TryTypeMember<_, string?>(st, name, "Namespace", m, "", fun st -> st.Namespace) |> unmarshal // TODO NULLNESS: why is this explicit instantiation needed?
1125+
let namespaceName = TryTypeMember<_, string __withnull>(st, name, "Namespace", m, "", fun st -> st.Namespace) |> unmarshal // TODO NULLNESS: why is this explicit instantiation needed?
11261126
#endif
11271127

11281128
let rec declaringTypes (st: Tainted<ProvidedType>) accu =
@@ -1149,7 +1149,7 @@ let ValidateProvidedTypeAfterStaticInstantiation(m, st: Tainted<ProvidedType>, e
11491149
#if NO_CHECKNULLS
11501150
let namespaceName = TryTypeMember(st, name, "Namespace", m, FSComp.SR.invalidNamespaceForProvidedType(), fun st -> st.Namespace) |> unmarshal
11511151
#else
1152-
let namespaceName = TryTypeMember<_, string?>(st, name, "Namespace", m, FSComp.SR.invalidNamespaceForProvidedType(), fun st -> st.Namespace) |> unmarshal
1152+
let namespaceName = TryTypeMember<_, string __withnull>(st, name, "Namespace", m, FSComp.SR.invalidNamespaceForProvidedType(), fun st -> st.Namespace) |> unmarshal
11531153
#endif
11541154
let fullName = TryTypeMemberNonNull(st, name, "FullName", m, FSComp.SR.invalidFullNameForProvidedType(), fun st -> st.FullName) |> unmarshal
11551155
ValidateExpectedName m expectedPath expectedName st
@@ -1258,7 +1258,7 @@ let ValidateProvidedTypeDefinition(m, st: Tainted<ProvidedType>, expectedPath: s
12581258
#if NO_CHECKNULLS
12591259
let _namespaceName = TryTypeMember(st, name, "Namespace", m, FSComp.SR.invalidNamespaceForProvidedType(), fun st -> st.Namespace) |> unmarshal
12601260
#else
1261-
let _namespaceName = TryTypeMember<_, (string?)>(st, name, "Namespace", m, FSComp.SR.invalidNamespaceForProvidedType(), fun st -> st.Namespace) |> unmarshal
1261+
let _namespaceName = TryTypeMember<_, string __withnull>(st, name, "Namespace", m, FSComp.SR.invalidNamespaceForProvidedType(), fun st -> st.Namespace) |> unmarshal
12621262
#endif
12631263
let _fullname = TryTypeMemberNonNull(st, name, "FullName", m, FSComp.SR.invalidFullNameForProvidedType(), fun st -> st.FullName) |> unmarshal
12641264
ValidateExpectedName m expectedPath expectedName st

src/FSharp.Build/FSharp.Build.fsproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<AssemblyName>FSharp.Build</AssemblyName>
1010
<NoWarn>$(NoWarn);75</NoWarn> <!-- InternalCommandLineOption -->
1111
<AllowCrossTargeting>true</AllowCrossTargeting>
12-
<CheckNulls>true</CheckNulls>
1312
<DefineConstants>$(DefineConstants);LOCALIZATION_FSBUILD</DefineConstants>
1413
<NoWarn>$(NoWarn);NU1701;FS0075</NoWarn>
1514
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

0 commit comments

Comments
 (0)