Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
312 commits
Select commit Hold shift + click to select a range
820e3b5
merge main
Nov 11, 2020
929e87a
Merge pull request #10435 from dotnet/merges/main-to-feature/nullness
KevinRansom Nov 11, 2020
2d8a3a7
merge
KevinRansom Nov 12, 2020
28bb9a6
temp
KevinRansom Nov 12, 2020
ea4e08e
Merge pull request #10437 from dotnet/merges/main-to-feature/nullness
KevinRansom Nov 12, 2020
c1b61f1
Merge pull request #10451 from dotnet/merges/main-to-feature/nullness
cartermp Nov 13, 2020
6ed2d51
merge main
Dec 7, 2020
4057fe5
merge main
Dec 7, 2020
e894771
merge main
Dec 8, 2020
f6f7792
fix test
Dec 8, 2020
6af18ba
Merge pull request #10644 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 8, 2020
de3b3fb
merge main
Dec 10, 2020
513b596
fix up tests
Dec 10, 2020
c6f9dce
Merge pull request #10672 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 11, 2020
605d002
Merge pull request #10682 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 11, 2020
44f0fc8
Merge pull request #10688 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 11, 2020
3d5a206
merge main
Dec 13, 2020
ea679ed
fix build
Dec 13, 2020
4f35d4b
fix build
Dec 13, 2020
2df2f9c
Merge pull request #10699 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 14, 2020
66715e8
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
KevinRansom Dec 14, 2020
a2dd3df
Merge pull request #10710 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 15, 2020
567d75a
Merge pull request #10717 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 15, 2020
c07b080
Merge pull request #10723 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 16, 2020
22ffcd3
Merge pull request #10730 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 16, 2020
cd378c2
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
KevinRansom Dec 16, 2020
a74e8d0
Merge pull request #10741 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 16, 2020
d824ddf
Merge pull request #10746 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 17, 2020
ba6cd68
integrate main
Dec 21, 2020
0746c5e
integrate main
Dec 21, 2020
e0b6bc0
fix baseline
Dec 21, 2020
63f906b
Merge pull request #10774 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 22, 2020
890d63e
Merge pull request #10788 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 23, 2020
2ea27c5
Merge pull request #10795 from dotnet/merges/main-to-feature/nullness
cartermp Dec 23, 2020
38a1f9d
Merge pull request #10800 from dotnet/merges/main-to-feature/nullness
KevinRansom Dec 23, 2020
d2f9413
integrate main
Feb 4, 2021
d893436
update baselines
Feb 4, 2021
001ae14
fix bootstrap build
Feb 4, 2021
d285ab7
merge
KevinRansom Feb 7, 2021
30a10b3
Merge pull request #11037 from dotnet/merges/main-to-feature/nullness
cartermp Feb 7, 2021
d001e31
Merge pull request #11052 from dotnet/merges/main-to-feature/nullness
KevinRansom Feb 8, 2021
938e4be
Merge pull request #11063 from dotnet/merges/main-to-feature/nullness
KevinRansom Feb 9, 2021
eb198ef
merge main
Mar 29, 2021
9214f1f
integrate main
May 24, 2021
4a5305a
disable failing test
May 24, 2021
513cd81
integrate main
May 27, 2021
fc2ae1d
merge main and update baselines
Jun 3, 2021
6cb58db
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/…
Jun 4, 2021
1b1fe1c
fix build
Jun 8, 2021
fddc444
update baselines
dsyme Jun 8, 2021
e4029bf
merge main
dsyme Jun 9, 2021
dfe60b3
fix tests
dsyme Jun 10, 2021
9c69ea2
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/…
dsyme Jun 10, 2021
5a05d99
merge main
Jun 24, 2021
a296b61
fix build
Jun 24, 2021
791ac88
fix build
Jun 24, 2021
b59a2ed
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/…
Jun 25, 2021
97567a9
fix build
Jun 25, 2021
7aba706
fix build
Jun 25, 2021
c8075cd
reset baselines before merge
dsyme Mar 4, 2022
a93eb24
reset baselines before merge
dsyme Mar 4, 2022
c8aa40b
merge main up to 9d4fb7d1b728eb443b9c6bf9398f322ffd53788c
dsyme Mar 4, 2022
224f34f
merge main up to ee93a1b3a8b704bea29ab4ad18858d696b9442a1
dsyme Mar 4, 2022
13c4a1e
merge main up to 19b8f3c5a6e8119721a6bf9368bdcbd62e58a49a
dsyme Mar 4, 2022
df82c3e
merge main up to e219c1ce6d18bfbf3d69ec2e07980cde4b4cbfda
dsyme Mar 4, 2022
994f7d0
merge main up to 0458724cfeac601f656a424de9d0b7aafcda8c36
dsyme Mar 4, 2022
be73080
merge main up to 95b26d45cbe010daaa64fa13dbc8adf566a3409f
dsyme Mar 4, 2022
ec91c79
Merge commit '3011cb126cafc23ee93bd05a9997c13212ad3a09' into feature/…
dsyme Mar 4, 2022
f16a74c
Merge commit 'f24f6793d03277d41ee2f9294aabb09e005f0e69' into feature/…
dsyme Mar 4, 2022
ae568f9
merge main
dsyme Mar 4, 2022
c865d31
fix build, disable feature
dsyme Mar 4, 2022
cab562e
fix build
dsyme Mar 4, 2022
80c0131
fix build
dsyme Mar 4, 2022
db17b6a
fix build
dsyme Mar 4, 2022
15b3f29
fix build
dsyme Mar 7, 2022
b61839f
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/…
dsyme Mar 7, 2022
767e462
fix tests
dsyme Mar 7, 2022
ce93b95
cleanup
dsyme Mar 7, 2022
9aaeb6f
fix change to diagnostic
dsyme Mar 8, 2022
b62363a
simplify diff
dsyme Mar 8, 2022
1d757fa
Merge branch 'main' of https://github.com/dotnet/fsharp into n2
dsyme Mar 8, 2022
1610679
cleanup to align with nullness work
dsyme Mar 8, 2022
ec91048
fix build
dsyme Mar 8, 2022
95bf887
fix build and apply null checking to VFSI
dsyme Mar 8, 2022
8ed5ad8
merge main
dsyme Mar 8, 2022
ff09edc
minimize diff
dsyme Mar 8, 2022
2fb2da8
minimize diff
dsyme Mar 8, 2022
577f763
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/…
dsyme Mar 8, 2022
4dc42e1
merge main
dsyme Mar 8, 2022
481093f
merge main
dsyme Mar 8, 2022
59f21ea
merge main
dsyme Mar 8, 2022
a9cb7da
transfer more diffs
dsyme Mar 8, 2022
ce11bea
align diff
dsyme Mar 8, 2022
2be4e3e
minimise diff
dsyme Mar 8, 2022
ad6299e
minimise diff
dsyme Mar 8, 2022
77b648d
minimise diff
dsyme Mar 8, 2022
9cb7754
reverse change
dsyme Mar 8, 2022
029a778
Merge branch 'feature/cleanup' of https://github.com/dotnet/fsharp in…
dsyme Mar 8, 2022
e2f78c6
merge
dsyme Mar 8, 2022
d093cff
merge
dsyme Mar 8, 2022
83dc139
merge main
dsyme Mar 9, 2022
6b7bcfe
further cleanup
dsyme Mar 9, 2022
3e4ef73
minimise diff
dsyme Mar 9, 2022
548021b
minimise diff
dsyme Mar 9, 2022
cdb2a60
reduce diff
dsyme Mar 9, 2022
cca6ea6
merge feature/cleanup
dsyme Mar 9, 2022
969b12d
merge feature/cleanup
dsyme Mar 9, 2022
a5fb875
more cleanup
dsyme Mar 9, 2022
47175cc
more cleanup
dsyme Mar 9, 2022
8c5fdb3
merge feature/cleanup
dsyme Mar 9, 2022
72632f1
merge feature/cleanup
dsyme Mar 9, 2022
b462169
more cleanup
dsyme Mar 9, 2022
563753a
minimise diff
dsyme Mar 9, 2022
e2cf998
merge feature/cleanup
dsyme Mar 9, 2022
670b27f
fix build
dsyme Mar 9, 2022
78d8eff
fix merge
dsyme Mar 9, 2022
0e7aa56
more cleanup
dsyme Mar 10, 2022
5c4d071
Merge branch 'feature/cleanup' of https://github.com/dotnet/fsharp in…
dsyme Mar 10, 2022
26f9241
update baseline
dsyme Mar 10, 2022
2e874a9
more cleanup
dsyme Mar 10, 2022
87f5650
Merge branch 'feature/cleanup' of https://github.com/dotnet/fsharp in…
dsyme Mar 10, 2022
f4238dd
fix some of build
dsyme Mar 11, 2022
c79ea8e
merge main
dsyme Mar 11, 2022
a654aeb
Merge branch 'main' into feature/nullness
dsyme Mar 16, 2022
6c300d1
Merge commit '2b62bf44db30e7f66516b0b0194ef21f9fcded7a' into feature/…
dsyme May 7, 2022
e9ee27f
Merge commit 'c6450cad2780c51005c930c1c271af128f149e2f' into feature/…
dsyme May 7, 2022
9d38551
Merge commit 'd0b5479d8a53f15a7903562b22d9a098d194b26d' into feature/…
dsyme May 7, 2022
3950a6b
Merge commit '3b15483a8c9725f7cc0696c41d0cc4df9f41a835' into feature/…
dsyme May 7, 2022
5912b8f
merge
dsyme May 7, 2022
4152cb5
Merge commit '3fa8ebebc11d65fc1f1e3ee7d30db776bab53ddb' into feature/…
dsyme May 7, 2022
fcc5ca7
Merge commit '40314e9b37312a3e49cd31c05e3379457f34c804' into feature/…
dsyme May 7, 2022
810cc3f
apply change
dsyme May 7, 2022
b99588c
apply change
dsyme May 7, 2022
424f8ff
Merge commit '64c3257dc46686a268aff12af15f1f7ce9fea420' into feature/…
dsyme May 7, 2022
6170727
Merge commit 'd1cd83629cd14b64e740deb5793a25ef4e0eea83' into feature/…
dsyme May 7, 2022
c408e9c
Merge commit 'db6ce1b72fae3cb97bed86649682388fe8b85813' into feature/…
dsyme May 7, 2022
b4349ef
Merge commit '186ee70bbb44752997213f4d5e92535cb57bf9b1' into feature/…
dsyme May 7, 2022
aaf4235
Merge commit '4259d410c7e1bc4893f566ebc45e0cc8909a0fdb' into feature/…
dsyme May 7, 2022
5618bc3
apply change
dsyme May 7, 2022
9a818c6
merge
dsyme May 7, 2022
635a559
merge
dsyme May 7, 2022
bdfa15e
Merge commit '8640a9c8b90870ca46b9a0883ef3400db69054bd' into feature/…
dsyme May 7, 2022
ca887eb
merge
dsyme May 7, 2022
ddf3764
Merge commit '2de40458360778d674cd1fd87734fbf9494ec830' into feature/…
dsyme May 7, 2022
f2eaf7f
Merge commit 'c5b2e7bfda9e955e677f3fbe7416c3917c67760f' into feature/…
dsyme May 7, 2022
233aa0e
merge
dsyme May 7, 2022
016a05c
Merge commit '870b816a6c00e1c9d759d525e7ee351a765aeca7' into feature/…
dsyme May 7, 2022
5aaad63
rname and align to track diffs
dsyme May 7, 2022
0128e9d
merge
dsyme May 7, 2022
9c490bc
merge
dsyme May 7, 2022
6f02d61
merge main
dsyme May 7, 2022
b212c3d
merge and format
dsyme May 7, 2022
7abda81
merge main
dsyme May 11, 2022
70d827a
options
dsyme May 11, 2022
62999d3
merge main
dsyme May 23, 2022
211d2e6
merge main
dsyme Jul 11, 2022
99dfa17
format code
dsyme Jul 11, 2022
87d791f
Merge commit '205b9a8908e71e5c158cc211af41b3bc7b1c1cf3' into feature/…
dsyme Oct 25, 2022
6c6c191
merge main
dsyme Oct 25, 2022
53a36e7
merge main
dsyme Oct 25, 2022
85591a6
Merge commit '886734eb2740c241fe270b36daddaaa69775a914' into feature/…
dsyme Oct 25, 2022
72c8864
merge main
dsyme Oct 25, 2022
53dfade
merge main
dsyme Oct 25, 2022
9fa5749
Merge commit '7415f555fd3c9ea0bbec7b005385a468d3d34b14' into feature/…
dsyme Oct 25, 2022
aafe5d6
Merge commit '329b55807aae741a1d15c353005056842d3dec61' into feature/…
dsyme Oct 25, 2022
c191969
merge main
dsyme Oct 25, 2022
cc4e274
Merge commit 'efdcde29108055b5ac8881e032bb3579ff81526d' into feature/…
dsyme Oct 25, 2022
c4d2667
merge main
dsyme Oct 25, 2022
d6abc76
Merge commit 'dc269a93179963f5c6874eb34dc14b52229349c5' into feature/…
dsyme Oct 25, 2022
5c40c4b
Merge commit 'eb72891948f98f67b9620e9d61a1d991c415350a' into feature/…
dsyme Oct 25, 2022
62213e5
Merge commit 'b6127f9cba1a8cfb8c08e3160da2602cc0268377' into feature/…
dsyme Oct 25, 2022
952c6b6
Merge commit '192b86dbc86bb45b38aa23570486e574ed58c920' into feature/…
dsyme Oct 25, 2022
55282a4
Merge commit '314e144d1d9db8d0d24e946d4789197429978317' into feature/…
dsyme Oct 25, 2022
8896155
Merge commit '11692d9d05e22cce4da3064e28caf09651550d0d' into feature/…
dsyme Oct 25, 2022
05c1156
Merge commit '1aefc2f54217bddf7098f08eecaf37b63744e7dc' into feature/…
dsyme Oct 25, 2022
87336b3
Merge commit 'f8b56cb6db3c90348810263fd7a5d37dc5719e92' into feature/…
dsyme Oct 25, 2022
c267534
merge main
dsyme Oct 25, 2022
88b43a8
merge main
dsyme Oct 25, 2022
34721cb
merge main
dsyme Oct 25, 2022
3845d1b
Merge commit 'b8184b122ffed1d8c3932b524fa24d1f261de9b9' into feature/…
dsyme Oct 25, 2022
189d6e7
Merge commit 'e0927a28fac77d3a37164a4582ad25f7fa68aadc' into feature/…
dsyme Oct 25, 2022
935c0de
merge main
dsyme Oct 25, 2022
3e72c3f
merge main
dsyme Oct 25, 2022
76d93c9
Merge commit '72c6403e4b30a7994d5b32064eabc19269ff136e' into feature/…
dsyme Oct 25, 2022
b423d66
Merge commit '710a5d1e81708b67ef6924234a87b69f920c5af7' into feature/…
dsyme Oct 25, 2022
bdf690d
Merge commit 'b09539b457471a88975ce46ee08ff137c8471c6b' into feature/…
dsyme Oct 25, 2022
5056aec
merge main
dsyme Oct 25, 2022
4b290cb
Merge commit 'bdcb444f40fa2a08d2c76c78ad8c3c7e13ce14c2' into feature/…
dsyme Oct 25, 2022
68cd01e
Merge commit '236db9817ee215ce3c086928ace8c891d8c3564d' into feature/…
dsyme Oct 25, 2022
8c274c1
Merge commit 'f984804e136e2423383475bda24b1b4ec2384c40' into feature/…
dsyme Oct 25, 2022
8059ff0
Merge commit '5a72e586278150b7aea4881829cd37be872b2043' into feature/…
dsyme Oct 25, 2022
7c0b0c2
Merge commit '0063f20f6cd49d016d5d234b9c1b7df00c2e9a4d' into feature/…
dsyme Oct 25, 2022
471bb27
Merge commit '9d29090169c27c487faf260037a75fc4f86d943e' into feature/…
dsyme Oct 25, 2022
4e3fe06
Merge commit '9a29bed37d0e8f28b85417b531ffc4b1ab7e851e' into feature/…
dsyme Oct 25, 2022
9522f35
merge main
dsyme Oct 25, 2022
b2f4231
Merge commit 'e06e079ebfecc48db530351a1cbf48b93dfb2979' into feature/…
dsyme Oct 25, 2022
b8fe3ec
Merge commit '9b9c0fdcda18f689e0c8e93a4db915f51077b0cb' into feature/…
dsyme Oct 25, 2022
13769a8
Merge commit '2c3ff6d126964477c7dfdd8b6f86992b96294bc1' into feature/…
dsyme Oct 25, 2022
2de2212
merge main
dsyme Oct 25, 2022
9334dbe
Merge commit 'cdc596316c61e7b18775ceff81269826a415a050' into feature/…
dsyme Oct 25, 2022
8cbbd29
Merge commit 'e05bdc2dba27d0450363d8335ccc195c77c23914' into feature/…
dsyme Oct 25, 2022
c6840a4
merge main
dsyme Oct 25, 2022
bb2e20e
Merge commit '08951d22ede1e6c07fc4179e3a24611b2476ed7a' into feature/…
dsyme Oct 25, 2022
616ba03
merge main
dsyme Oct 25, 2022
5454e24
Merge commit '273bb4b97f7d771a53a6f5316361c02eea8ac2e4' into feature/…
dsyme Oct 25, 2022
0b8aba6
Merge commit '4877fd78f38e981cd7effa8aab8687edfa68c99f' into feature/…
dsyme Oct 25, 2022
25140ed
Merge commit '39cbe982937ac6e486bb62f5c936801362b9776a' into feature/…
dsyme Oct 25, 2022
582aa43
Merge commit '179db4edd53e8bbe87f7a3dd15e68cf370caae99' into feature/…
dsyme Oct 25, 2022
9593125
Merge commit '97c7b9a621d3be21e876cd59fb7d17ecf28ee40a' into feature/…
dsyme Oct 25, 2022
202bb1f
merge main
dsyme Oct 25, 2022
d800485
Merge commit 'fcbc1ddffe650388202725bcd426672ecd7b3650' into feature/…
dsyme Oct 25, 2022
5536ad4
Merge commit '4f7f156c96e37e2bc211ec9b9b109bbbfaa688b4' into feature/…
dsyme Oct 25, 2022
c0af19e
merge main
dsyme Oct 25, 2022
b2d14fc
Merge commit '30b3a8fa53bf48da2b79492cddd98b4d219336a3' into feature/…
dsyme Oct 25, 2022
6515a36
Merge commit 'cc4f64158c5d086ce0dffec1da65c8c6bca3223e' into feature/…
dsyme Oct 25, 2022
aa5bd20
merge main
dsyme Oct 25, 2022
4b5c14d
Merge commit '89e91ddcb7f3bb3fc01edcc2cfecea7e06d55cae' into feature/…
dsyme Oct 25, 2022
3cf1372
merge main
dsyme Oct 25, 2022
25eb516
Merge commit 'fcd06c7d96ade90417a5ae651f939360225913d3' into feature/…
dsyme Oct 25, 2022
1bf29e8
Merge commit '67f9ccff7dff30e44fbf82711087ad51a559a8ca' into feature/…
dsyme Oct 25, 2022
9c56b34
merge main
dsyme Oct 25, 2022
92e8c9c
merge main
dsyme Oct 25, 2022
92d45c5
merge main
dsyme Oct 25, 2022
e43c185
merge main
dsyme Oct 25, 2022
16893f5
Merge commit '05201993cfaac663c72b6431d81f543e3d001dfe' into feature/…
dsyme Oct 25, 2022
3201c13
merge main
dsyme Oct 25, 2022
e10bdfa
Merge commit '20c78287b799a21b9d0ec82e6cdcc2d6bb788bd8' into feature/…
dsyme Oct 25, 2022
6dc88f3
Merge commit '0040029e335aac11bfb43040d0441f1fbc9fd722' into feature/…
dsyme Oct 25, 2022
91db787
merge main
dsyme Oct 25, 2022
6be60cf
merge main
dsyme Oct 25, 2022
2c92218
Merge commit 'cecc728fb8aadc41647c24daed34a59186225acb' into feature/…
dsyme Oct 25, 2022
aa8880a
merge main
dsyme Oct 25, 2022
1016d85
fix build
dsyme Oct 25, 2022
abde255
merge main
dsyme Apr 26, 2023
05ad4af
bring branch up-to-date
dsyme Apr 26, 2023
9a21a9a
use psuedo keywords until syntax is sorted out after merge
dsyme Apr 28, 2023
7f57cd1
minimize diff
dsyme Apr 28, 2023
d817add
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/…
dsyme Apr 28, 2023
6cbfb82
minimize diff
dsyme Apr 28, 2023
e0db05f
minimize diff
dsyme Apr 28, 2023
5ff14d1
minimize diff
dsyme Apr 28, 2023
da0bd75
minimize diff
dsyme Apr 28, 2023
55a5af1
minimize diff
dsyme Apr 28, 2023
245db3b
minimize diff
dsyme Apr 28, 2023
12aa179
fix build
dsyme Apr 28, 2023
8b9a263
reduce diff
dsyme Apr 28, 2023
6971514
minimize diff
dsyme Apr 28, 2023
4b74a6c
protect assembly exploration and more minimization
dsyme Apr 28, 2023
4da4bdd
integrate diff minimization
dsyme Apr 29, 2023
289f9e8
merge main
dsyme May 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .fantomasignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,23 @@ src/FSharp.Core/Query.fs
src/FSharp.Core/seqcore.fs


# fsharp (to investigate)

**/TypeProviders.fsi
**/tainted.fsi

# uses nullness features

**/DependencyProvider.fsi
src/FSharp.Core/array.fs
src/FSharp.Core/option.fsi
src/FSharp.Core/option.fs
src/fsi/console.fs
src/FSharp.Build/FSharpCommandLineBuilder.fs
src/Compiler/Utilities/sformat.fs
src/Compiler/Utilities/illib.fsi
src/Compiler/Utilities/illib.fs

# Fantomas limitations on implementation files (to investigate)

src/Compiler/AbstractIL/ilwrite.fs
Expand Down
30 changes: 30 additions & 0 deletions FSharp.Profiles.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -->
<Project>
<PropertyGroup>
<!-- This turns off the feature in FSharp.Core. -->
<NullCheckingSupportInLibrary>false</NullCheckingSupportInLibrary>
<!-- If the feature is on, this turns off null checking in all assemblies. Otherwise it is selectively enabled in the project files. -->
<CheckNulls>false</CheckNulls>
</PropertyGroup>

<PropertyGroup Condition="'$(FSHARPCORE_USE_PACKAGE)' == 'true'">
<!-- nullness checking isn't possible when using shipped FSHarp.Core package until it's updated -->
<CheckNulls>false</CheckNulls>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Proto'">
<DefineConstants>BUILDING_WITH_LKG;NO_CHECKNULLS;$(DefineConstants)</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' != 'Proto' AND '$(CheckNulls)' == 'true'">
<OtherFlags>$(OtherFlags) /langversion:preview /checknulls</OtherFlags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' != 'Proto' AND '$(CheckNulls)' != 'true'">
<OtherFlags>$(OtherFlags) /langversion:preview</OtherFlags>
<!-- 3271: warning nullness annotations being ignored -->
<NoWarn>$(NoWarn);3271</NoWarn>
<DefineConstants>$(DefineConstants);NO_CHECKNULLS</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(NullCheckingSupportInLibrary)' == 'false'">
<DefineConstants>NO_NULLCHECKING_LIB_SUPPORT;$(DefineConstants)</DefineConstants>
</PropertyGroup>

<Choose>
<When Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
Expand Down
4 changes: 2 additions & 2 deletions src/Compiler/AbstractIL/ilread.fs
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ let mkCacheInt32 lowMem _inbase _nm _sz =
if lowMem then
(fun f x -> f x)
else
let mutable cache = null
let mutable cache: ConcurrentDictionary<int32, _> MaybeNull = null // TODO NULLNESS: this explicit annotation should not be needed
let mutable count = 0
#if STATISTICS
addReport (fun oc ->
Expand Down Expand Up @@ -960,7 +960,7 @@ let mkCacheGeneric lowMem _inbase _nm _sz =
if lowMem then
(fun f x -> f x)
else
let mutable cache = null
let mutable cache: ConcurrentDictionary<_, _> MaybeNull = null // TODO NULLNESS: this explicit annotation should not be needed
let mutable count = 0
#if STATISTICS
addReport (fun oc ->
Expand Down
56 changes: 47 additions & 9 deletions src/Compiler/Checking/CheckExpressions.fs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,7 @@ module GeneralizationHelpers =
match tp.Constraints |> List.partition (function TyparConstraint.CoercesTo _ -> true | _ -> false) with
| [TyparConstraint.CoercesTo(tgtTy, _)], others ->
// Throw away null constraints if they are implied
if others |> List.exists (function TyparConstraint.SupportsNull _ -> not (TypeSatisfiesNullConstraint g m tgtTy) | _ -> true)
if others |> List.exists (function TyparConstraint.SupportsNull _ -> not (TypeNullIsExtraValue g m tgtTy) | _ -> true)
then None
else Some tgtTy
| _ -> None
Expand Down Expand Up @@ -3956,7 +3956,10 @@ let rec TcTyparConstraint ridx (cenv: cenv) newOk checkConstraints occ (env: TcE
tpenv

| SynTypeConstraint.WhereTyparSupportsNull(tp, m) ->
TcSimpleTyparConstraint cenv env newOk tpenv tp m AddCxTypeUseSupportsNull
TcSimpleTyparConstraint cenv env newOk tpenv tp m AddCxTypeDefnSupportsNull

| SynTypeConstraint.WhereTyparNotSupportsNull(tp, m) ->
TcSimpleTyparConstraint cenv env newOk tpenv tp m AddCxTypeDefnNotSupportsNull

| SynTypeConstraint.WhereTyparIsComparable(tp, m) ->
TcSimpleTyparConstraint cenv env newOk tpenv tp m AddCxTypeMustSupportComparison
Expand Down Expand Up @@ -4370,11 +4373,46 @@ and TcTypeOrMeasure kindOpt (cenv: cenv) newOk checkConstraints occ (iwsam: Warn
| SynType.StaticConstant (synConst, m) ->
TcTypeStaticConstant kindOpt tpenv synConst m

| SynType.StaticConstantNull m
| SynType.StaticConstantNamed (_, _, m)
| SynType.StaticConstantExpr (_, m) ->
errorR(Error(FSComp.SR.parsInvalidLiteralInType(), m))
NewErrorType (), tpenv

| SynType.WithNull(innerTy, ambivalent, m) ->
let innerTyC, tpenv = TcTypeAndRecover cenv newOk checkConstraints occ WarnOnIWSAM.Yes env tpenv innerTy
if g.langFeatureNullness then
if TypeNullNever g innerTyC then
let tyString = NicePrint.minimalStringOfType env.DisplayEnv innerTyC
errorR(Error(FSComp.SR.tcTypeDoesNotHaveAnyNull(tyString), m))

// TODO - doesn't feel right - it will add KnownNotNull + KnownWithNull --> KnownWithNull, e.g.
// let f (x: string) = (x = null)
match tryAddNullnessToTy (if ambivalent then KnownAmbivalentToNull else KnownWithNull) innerTyC with

| None ->
let tyString = NicePrint.minimalStringOfType env.DisplayEnv innerTyC
errorR(Error(FSComp.SR.tcTypeDoesNotHaveAnyNull(tyString), m))
innerTyC, tpenv

| Some innerTyCWithNull ->
// The inner type is not allowed to support null or use null as a representation value.
// For example "int option?" is not allowed, not "string??".
//
// For variable types in FSharp.Core we make an exception because we must allow
// val toObj: value: 'T option -> 'T __withnull when 'T : not struct (* and 'T : __notnull *)
// wihout implying 'T is not null. This is because it is legitimate to use this
// function to "collapse" null and obj-null-coming-from-option using such a function.

if g.compilingFSharpCore && not (isTyparTy g innerTyC) then
AddCxTypeDefnNotSupportsNull env.DisplayEnv cenv.css m NoTrace innerTyC

innerTyCWithNull, tpenv

else
warning(Error(FSComp.SR.tcNullnessCheckingNotEnabled(), m))
innerTyC, tpenv

| SynType.MeasurePower(ty, exponent, m) ->
TcTypeMeasurePower kindOpt cenv newOk checkConstraints occ env tpenv ty exponent m

Expand Down Expand Up @@ -4524,7 +4562,7 @@ and TcFunctionType (cenv: cenv) newOk checkConstraints occ env tpenv domainTy re
and TcArrayType (cenv: cenv) newOk checkConstraints occ env tpenv rank elemTy m =
let g = cenv.g
let elemTy, tpenv = TcTypeAndRecover cenv newOk checkConstraints occ WarnOnIWSAM.Yes env tpenv elemTy
let tyR = mkArrayTy g rank elemTy m
let tyR = mkArrayTy g rank g.knownWithoutNull elemTy m
tyR, tpenv

and TcTypeParameter kindOpt (cenv: cenv) env newOk tpenv tp =
Expand All @@ -4549,8 +4587,9 @@ and TcTypeWithConstraints (cenv: cenv) env newOk checkConstraints occ tpenv synT
and TcTypeHashConstraint (cenv: cenv) env newOk checkConstraints occ tpenv synTy m =
let tp = TcAnonTypeOrMeasure (Some TyparKind.Type) cenv TyparRigidity.WarnIfNotRigid TyparDynamicReq.Yes newOk m
let ty, tpenv = TcTypeAndRecover cenv newOk checkConstraints occ WarnOnIWSAM.No env tpenv synTy
AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace ty (mkTyparTy tp)
tp.AsType, tpenv
let tpTy = mkTyparTy tp
AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace ty tpTy
tpTy, tpenv

and TcTypeStaticConstant kindOpt tpenv c m =
match c, kindOpt with
Expand Down Expand Up @@ -4704,7 +4743,7 @@ and TcStaticConstantParameter (cenv: cenv) (env: TcEnv) tpenv kind (StripParenTy
| SynConst.Double n when typeEquiv g g.float_ty kind -> record(g.float_ty); box (n: double)
| SynConst.Char n when typeEquiv g g.char_ty kind -> record(g.char_ty); box (n: char)
| SynConst.String (s, _, _)
| SynConst.SourceIdentifier (_, s, _) when s <> null && typeEquiv g g.string_ty kind -> record(g.string_ty); box (s: string)
| SynConst.SourceIdentifier (_, s, _) when typeEquiv g g.string_ty kind -> record(g.string_ty); box (s: string)
| SynConst.Bool b when typeEquiv g g.bool_ty kind -> record(g.bool_ty); box (b: bool)
| _ -> fail()
v, tpenv
Expand Down Expand Up @@ -4733,7 +4772,6 @@ and TcStaticConstantParameter (cenv: cenv) (env: TcEnv) tpenv kind (StripParenTy
| Const.Single n -> record(g.float32_ty); box (n: single)
| Const.Double n -> record(g.float_ty); box (n: double)
| Const.Char n -> record(g.char_ty); box (n: char)
| Const.String null -> fail()
| Const.String s -> record(g.string_ty); box (s: string)
| Const.Bool b -> record(g.bool_ty); box (b: bool)
| _ -> fail()
Expand Down Expand Up @@ -4902,7 +4940,7 @@ and TcTypeApp (cenv: cenv) newOk checkConstraints occ env tpenv m tcref pathType
List.iter2 (UnifyTypes cenv env m) tinst actualArgTys

// Try to decode System.Tuple --> F# tuple types etc.
let ty = g.decompileType tcref actualArgTys
let ty = g.decompileType tcref actualArgTys g.knownWithoutNull

ty, tpenv

Expand Down Expand Up @@ -5557,7 +5595,7 @@ and TcExprUndelayed (cenv: cenv) (overallTy: OverallTy) env tpenv (synExpr: SynE

| SynExpr.Null m ->
TcNonControlFlowExpr env <| fun env ->
AddCxTypeUseSupportsNull env.DisplayEnv cenv.css m NoTrace overallTy.Commit
AddCxTypeDefnSupportsNull env.DisplayEnv cenv.css m NoTrace overallTy.Commit
mkNull m overallTy.Commit, tpenv

| SynExpr.Lazy (synInnerExpr, m) ->
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Checking/CheckPatterns.fs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ and TcRecordPat warnOnUpper cenv env vFlags patEnv ty fieldPats m =

and TcNullPat cenv env patEnv ty m =
try
AddCxTypeUseSupportsNull env.DisplayEnv cenv.css m NoTrace ty
AddCxTypeDefnSupportsNull env.DisplayEnv cenv.css m NoTrace ty
with exn ->
errorRecovery exn m
(fun _ -> TPat_null m), patEnv
Expand Down
Loading