Skip to content
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
2e8ab38
squash
dsyme May 24, 2023
5fc50c9
squash
dsyme May 24, 2023
208c48d
move adhoc tests and clean errors
dsyme May 24, 2023
e1ef334
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/…
dsyme May 24, 2023
74042c7
fix up constraint solving and adhoc testing
dsyme May 24, 2023
d4779f6
remove tests
dsyme May 24, 2023
c8cedb0
fantomas
dsyme May 24, 2023
4d2d637
skip fails
dsyme May 25, 2023
6bd707c
fix tests
dsyme May 25, 2023
c109cb4
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/…
dsyme May 25, 2023
2d7abe8
fix up test baselines for change in order in checking
dsyme May 25, 2023
2cbdcd0
update tests
dsyme May 25, 2023
382354a
don't overwrite baselines
dsyme May 25, 2023
1685da8
fix some test failures
dsyme May 25, 2023
11e88c8
skip warnings
dsyme May 25, 2023
211e7da
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/…
dsyme May 25, 2023
ee80415
skip warnings
dsyme May 25, 2023
f0fc3bf
fix warning logic
dsyme May 25, 2023
e4999fd
fix tests
dsyme May 25, 2023
0f83cd2
fix sizes
dsyme May 25, 2023
d3a7bc7
fix build
dsyme May 26, 2023
7b1afe0
fantomas and validation update
dsyme May 26, 2023
ffbbfd2
corrections to self-use
dsyme May 26, 2023
559c058
[WIP] [RFC FS-1060] Nullness checking (applied to codebase) (#15265)
dsyme Jun 2, 2023
a2edfd2
Revert "[WIP] [RFC FS-1060] Nullness checking (applied to codebase) (…
dsyme Jun 5, 2023
8b4f294
Merge main
vzarytovskii Jul 11, 2023
0c19792
Merge remote-tracking branch 'upstream/main' into feature/nullness
vzarytovskii Aug 3, 2023
cd063f3
Merge branch 'main' into feature/nullness
vzarytovskii Sep 7, 2023
4bfcda9
Merge with main
vzarytovskii Sep 7, 2023
9a58eb4
Fixes
vzarytovskii Sep 7, 2023
0e22136
Merge branch 'main' into feature/nullness
vzarytovskii Sep 7, 2023
f08b678
Feature/nullness - parsing of constraints (#15753)
T-Gro Sep 8, 2023
0d45bb9
applying changed syntax
T-Gro Sep 8, 2023
3811c98
positive.fs updated
T-Gro Sep 11, 2023
9edcc7f
positive.fs paranthesis
T-Gro Sep 11, 2023
60b1168
fixing "parse warning Remove spaces between the type name and type pa…
T-Gro Sep 11, 2023
ce815cd
positive .bsl updated
T-Gro Sep 11, 2023
4e275ce
Please mighty fantomas
T-Gro Sep 11, 2023
dea3e2f
Merge branch 'main' into feature/nullness
T-Gro Sep 12, 2023
0345c7b
Merge branch 'feature/nullness' into feature/nullness_apply_syntax
T-Gro Sep 12, 2023
9dbd29e
Merge pull request #15959 from dotnet/feature/nullness_apply_syntax
T-Gro Sep 14, 2023
aa844a4
Feature nullness metadata export (#15981)
T-Gro Oct 9, 2023
2a28419
Merge branch 'main' into feature/nullness
T-Gro Nov 28, 2023
c5b3781
fix merge mistake
T-Gro Nov 28, 2023
70adb59
fix build
T-Gro Nov 28, 2023
51ccb50
fantomas
T-Gro Nov 28, 2023
5a74640
bsl fix
T-Gro Nov 28, 2023
36761eb
Merge branch 'main' into feature/nullness
T-Gro Nov 28, 2023
f690ab6
il tests update
T-Gro Nov 28, 2023
ffd6567
fix test
T-Gro Nov 29, 2023
0ea09a6
tests fixed
T-Gro Nov 29, 2023
ce384d3
Merge branch 'main' into feature/nullness
T-Gro Nov 29, 2023
ef15719
fantomas
T-Gro Nov 29, 2023
f230a6f
fix tests
T-Gro Nov 30, 2023
7ea37af
Merge branch 'main' into feature/nullness
T-Gro Nov 30, 2023
97a9c31
trim test
T-Gro Dec 1, 2023
51044a7
trimming test
T-Gro Dec 1, 2023
7182913
trim check
T-Gro Dec 1, 2023
26de6fe
now?
T-Gro Dec 1, 2023
8f48a32
IL tests
T-Gro Dec 4, 2023
3f763a5
il tests
T-Gro Dec 4, 2023
cbfe777
trim test
T-Gro Dec 4, 2023
5e296b9
trim
T-Gro Dec 4, 2023
dec61d6
one more time
T-Gro Dec 4, 2023
91429b4
Merge main to feature/nullness (#16366)
dotnet-bot Dec 4, 2023
3f55d8d
Merge branch 'main' into feature/nullness
T-Gro Dec 4, 2023
73d670d
syntax tree layout
T-Gro Dec 4, 2023
4a19eb4
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Dec 5, 2023
4ef4815
Merge pull request #16383 from dotnet/merges/main-to-feature/nullness
T-Gro Dec 5, 2023
80efaa2
Nullness-related aggressive trimming of FSharp.Core (#16387)
T-Gro Dec 5, 2023
fe42158
Merge branch 'main' into feature/nullness
T-Gro Dec 5, 2023
3de7178
Merge branch 'main' into feature/nullness
T-Gro Dec 5, 2023
bf45dee
Merge main to feature/nullness (#16397)
dotnet-bot Dec 8, 2023
ed7854b
Merge branch 'main' into feature/nullness
T-Gro Dec 8, 2023
d697c63
Nullness interop - import of C#-emitted metadata (#16423)
T-Gro Jan 17, 2024
00a591c
Nullness - include in QuickInfo and in general in "typeEnc" (string r…
T-Gro Jan 23, 2024
38532af
Merge main to feature/nullness (#16539)
dotnet-bot Jan 24, 2024
e7f4f1f
conflicts resolved
T-Gro Jan 25, 2024
3c53e3b
release notes
T-Gro Jan 25, 2024
dfada6a
Merge branch 'main' into feature/nullness
T-Gro Jan 25, 2024
3250b7e
Fix ILType.Array import (#16585)
T-Gro Jan 25, 2024
cf735db
Merge branch 'main' into feature/nullness
T-Gro Jan 25, 2024
e0f1634
Nullness - reading+writing metadata for 'inherits' and interface imp…
T-Gro Jan 30, 2024
33e5e27
Merge branch 'main' into feature/nullness
T-Gro Jan 30, 2024
d70d1fe
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
KevinRansom Jan 31, 2024
a2df473
Merge pull request #16620 from dotnet/merges/main-to-feature/nullness
KevinRansom Jan 31, 2024
60c4fb0
ILGenerator test case
T-Gro Jan 31, 2024
ca7e0b4
Merge branch 'feature/nullness' of https://github.com/dotnet/fsharp i…
T-Gro Jan 31, 2024
29462f2
Merge pull request #16635 from dotnet/merges/main-to-feature/nullness
T-Gro Feb 1, 2024
f30c6a0
Merge branch 'main' into feature/nullness
T-Gro Feb 1, 2024
5811d88
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Feb 6, 2024
cd662eb
Merge pull request #16648 from dotnet/merges/main-to-feature/nullness
T-Gro Feb 6, 2024
bca1c53
Nullness :: Format string %s should allow nullable string (#16656)
T-Gro Feb 6, 2024
a35c0e2
Merge pull request #16660 from dotnet/merges/main-to-feature/nullness
T-Gro Feb 7, 2024
17f0ced
Nullness:: Unchecked.nonNull for FSharp.Core (#16654)
T-Gro Feb 7, 2024
d4dd6a8
Merge branch 'main' into feature/nullness
T-Gro Feb 8, 2024
552ea0a
Merge branch 'main' into feature/nullness
T-Gro Feb 8, 2024
fc5c6c4
Merge pull request #16679 from dotnet/merges/main-to-feature/nullness
KevinRansom Feb 9, 2024
c5ecfb4
Merge branch 'main' into feature/nullness
T-Gro Feb 9, 2024
3775088
Merge pull request #16685 from dotnet/merges/main-to-feature/nullness
KevinRansom Feb 10, 2024
17a5ca9
Nullness :: Pattern matching with null should mark input for subseque…
T-Gro Feb 12, 2024
9bc3f81
Merge branch 'main' into feature/nullness
T-Gro Feb 12, 2024
ec2d4a8
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Feb 13, 2024
b6b737f
Merge pull request #16694 from dotnet/merges/main-to-feature/nullness
T-Gro Feb 13, 2024
3754c86
Merge pull request #16705 from dotnet/merges/main-to-feature/nullness
KevinRansom Feb 14, 2024
bfd8520
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
KevinRansom Feb 16, 2024
ab8a943
Merge pull request #16722 from dotnet/merges/main-to-feature/nullness
T-Gro Feb 16, 2024
d487006
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Feb 17, 2024
0e3f43f
Merge pull request #16727 from dotnet/merges/main-to-feature/nullness
T-Gro Feb 17, 2024
49e0d7c
Merge pull request #16728 from dotnet/merges/main-to-feature/nullness
KevinRansom Feb 20, 2024
97d9437
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
KevinRansom Feb 23, 2024
6827b1c
Feature nullness - support overrides of nullness annotation in the im…
T-Gro Mar 4, 2024
552c843
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Mar 4, 2024
ba69485
Improve type inference w.r.t. nullness in printing (#16681)
T-Gro Mar 4, 2024
9ae3768
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
vzarytovskii Mar 4, 2024
e8f2b97
Update tests/AheadOfTime/Trimming/check.ps1
T-Gro Mar 4, 2024
1f2b43b
Merge pull request #16752 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 4, 2024
5eb9fea
Merge branch 'main' into feature/nullness
T-Gro Mar 4, 2024
055c772
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Mar 5, 2024
654c27f
Merge pull request #16808 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 5, 2024
806c58e
Merge branch 'main' into feature/nullness
T-Gro Mar 6, 2024
743996a
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Mar 11, 2024
171b69e
Merge branch 'main' into feature/nullness
T-Gro Mar 11, 2024
04b93e1
Fix merge errors
T-Gro Mar 11, 2024
b5b14b6
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Mar 11, 2024
cbaffad
Merge pull request #16840 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 11, 2024
2071594
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Mar 13, 2024
3c5605c
il tests reflecting visibility change
T-Gro Mar 18, 2024
cb696d5
Merge pull request #16866 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 18, 2024
14efaa4
Merge branch 'main' into feature/nullness
T-Gro Mar 18, 2024
72b7494
Nullness feature :: New warning for functions insisting on a (WithNul…
T-Gro Mar 19, 2024
74d1da2
Merge branch 'main' into feature/nullness
T-Gro Mar 19, 2024
ccc35ba
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Mar 21, 2024
8ff2ed1
Merge pull request #16915 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 21, 2024
5d89ba3
Merge pull request #16930 from dotnet/merges/main-to-feature/nullness
KevinRansom Mar 22, 2024
b84d754
Merge pull request #16939 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 25, 2024
7f502b7
Merge pull request #16949 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 26, 2024
65c7b8b
Merge branch 'main' into feature/nullness
T-Gro Mar 26, 2024
55cd42f
Feature nullness - propper guards against ` | null ` on unsupported t…
T-Gro Mar 28, 2024
b34e568
Merge pull request #16960 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 2, 2024
faba56d
Merge pull request #16980 from dotnet/merges/main-to-feature/nullness
KevinRansom Apr 4, 2024
a6be10c
Merge pull request #16989 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 5, 2024
b8feeac
Merge pull request #16996 from dotnet/merges/main-to-feature/nullness
KevinRansom Apr 6, 2024
9067ad6
Merge pull request #17007 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 10, 2024
647d797
Merge pull request #17023 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 11, 2024
bc8a27e
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Apr 12, 2024
58f8cac
Merge pull request #17037 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 16, 2024
b5b3f0d
Merge pull request #17058 from dotnet/merges/main-to-feature/nullness
KevinRansom Apr 17, 2024
c1b53bc
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Apr 18, 2024
42c6afd
Merge pull request #17065 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 18, 2024
d78f5aa
Feature nullness :: warn also for 'obj' type (since it can be infered…
T-Gro Apr 19, 2024
a0a7d82
Merge branch 'main' into feature/nullness
T-Gro Apr 19, 2024
13e8af2
Nullness feature :: various bugfixes (#17080)
T-Gro Apr 26, 2024
3bcf33d
Merge pull request #17083 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 26, 2024
14d666e
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Apr 29, 2024
fed2bdb
Merge branch 'main' into merges/main-to-feature/nullness
T-Gro May 16, 2024
ebdeebc
updating IL tests
T-Gro May 16, 2024
f161691
One more try
T-Gro May 16, 2024
6cf326c
surface area
T-Gro May 17, 2024
e154438
Merge branch 'main' into merges/main-to-feature/nullness
T-Gro May 17, 2024
0b65db9
trimmed size
T-Gro May 17, 2024
176275f
Merge pull request #17097 from dotnet/merges/main-to-feature/nullness
T-Gro May 17, 2024
a6373c9
Merge branch 'merges/main-to-feature/nullness' of https://github.com/…
T-Gro May 20, 2024
817ee1e
trimmed size
T-Gro May 20, 2024
61f5777
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro May 20, 2024
03e294f
Merge pull request #17175 from dotnet/merges/main-to-feature/nullness
T-Gro May 20, 2024
7da45b5
fix issues for plain 'dotnet build Fsharp.Compiler.Service.sln`
T-Gro May 20, 2024
c28b21a
update FSharpCoreShippedPackageVersionValue
T-Gro May 20, 2024
3570b2f
Wkraround attributetargets issue by using 'obj'. This removes 3x box …
T-Gro May 20, 2024
13e50b4
Merge pull request #17185 from dotnet/feature-nullness-fix-plain-builds
T-Gro May 21, 2024
3d375d2
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro May 21, 2024
e2e698d
Feature nullness :: Bugfixes (#17102)
T-Gro May 21, 2024
165f664
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro May 21, 2024
3603443
Merge pull request #17192 from dotnet/merges/main-to-feature/nullness
T-Gro May 21, 2024
101ae03
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Jun 11, 2024
aa62eef
Automated command ran: fantomas
github-actions[bot] Jun 11, 2024
a72457e
Feature nullness :: Try infer without null even when function/method…
T-Gro Jun 11, 2024
d4ad891
Feature nullness :: apply nullness annotations to usages of 'obj' in …
T-Gro Jun 11, 2024
382a327
Merge pull request #17213 from dotnet/merges/main-to-feature/nullness
T-Gro Jun 11, 2024
f9b1ccc
Merge branch 'main' into feature/nullness
T-Gro Jun 12, 2024
d84326b
resolve build error from auto-merge
T-Gro Jun 12, 2024
64033b9
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Jun 17, 2024
d2d7bd3
Merge pull request #17304 from dotnet/merges/main-to-feature/nullness
T-Gro Jun 17, 2024
7bde93c
Merge branch 'main' into feature/nullness
T-Gro Jun 17, 2024
679f605
Merge pull request #17320 from dotnet/merges/main-to-feature/nullness
T-Gro Jun 18, 2024
5488a35
Feature nullness :: Cleanups, Test reorg, fix incrementalbuild cache …
T-Gro Jun 19, 2024
107ee5c
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Jun 26, 2024
dc92a0c
Merge pull request #17337 from dotnet/merges/main-to-feature/nullness
T-Gro Jun 26, 2024
469899b
Merge branch 'merges/main-to-feature/nullness' of https://github.com/…
T-Gro Jul 1, 2024
24f923c
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Jul 1, 2024
c8cfda2
fix build issues
T-Gro Jul 1, 2024
653507c
Merge branch 'merges/main-to-feature/nullness' of https://github.com/…
T-Gro Jul 1, 2024
fedc901
Merge pull request #17354 from dotnet/merges/main-to-feature/nullness
T-Gro Jul 3, 2024
7ec905d
Merge branch 'main' into feature/nullness
T-Gro Jul 3, 2024
1f2e0c4
resolve semantic merge error
T-Gro Jul 3, 2024
ddd666d
merge
KevinRansom Jul 9, 2024
59938f4
Merge pull request #17395 from KevinRansom/nullness
T-Gro Jul 9, 2024
49bec1c
Nullness subsumption when used for contravariant typars
T-Gro Jul 9, 2024
6a65374
Merge branch 'feature/nullness' into feature-nullness-variance
T-Gro Jul 9, 2024
30c3432
fix nullness plain build (#17404)
T-Gro Jul 11, 2024
5f6b7da
Merge branch 'feature/nullness' into feature-nullness-variance
T-Gro Jul 11, 2024
3752733
Merge branch 'main' into feature/nullness
vzarytovskii Jul 11, 2024
57026b8
Merge pull request #17398 from dotnet/feature-nullness-variance
T-Gro Jul 11, 2024
972fa34
Update docs/release-notes/.FSharp.Compiler.Service/8.0.300.md
T-Gro Jul 11, 2024
c3d9efd
Merge branch 'main' into feature/nullness
vzarytovskii Jul 16, 2024
990c7ea
Update release notes
vzarytovskii Jul 16, 2024
1e74ec8
Update check.ps1
psfinaki Jul 16, 2024
1872156
Update check.ps1
psfinaki Jul 16, 2024
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@ nCrunchTemp_*
tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.actual
*.vsp
/tests/AheadOfTime/Trimming/output.txt
*.svclog
micro.exe
positive.exe
14 changes: 0 additions & 14 deletions VisualFSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Editor.Tests", "vsin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.Editor.IntegrationTests", "vsintegration\tests\FSharp.Editor.IntegrationTests\FSharp.Editor.IntegrationTests.csproj", "{E31F9B59-FCF1-4D04-8762-C7BB60285A7B}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "nullness", "tests\adhoc\nullness\nullness.fsproj", "{6992D926-AB1C-4CD4-94D5-0319D14DB54B}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Benchmarks.Common", "tests\benchmarks\FSharp.Benchmarks.Common\FSharp.Benchmarks.Common.fsproj", "{6734FC6F-B5F3-45E1-9A72-720378BB49C9}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "MicroPerf", "tests\benchmarks\CompiledCodeBenchmarks\MicroPerf\MicroPerf.fsproj", "{601CD5C1-EAFA-4AE3-8FB9-F667B5728213}"
Expand Down Expand Up @@ -984,18 +983,6 @@ Global
{E31F9B59-FCF1-4D04-8762-C7BB60285A7B}.Release|Any CPU.Build.0 = Release|Any CPU
{E31F9B59-FCF1-4D04-8762-C7BB60285A7B}.Release|x86.ActiveCfg = Release|Any CPU
{E31F9B59-FCF1-4D04-8762-C7BB60285A7B}.Release|x86.Build.0 = Release|Any CPU
{6992D926-AB1C-4CD4-94D5-0319D14DB54B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6992D926-AB1C-4CD4-94D5-0319D14DB54B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6992D926-AB1C-4CD4-94D5-0319D14DB54B}.Debug|x86.ActiveCfg = Debug|Any CPU
{6992D926-AB1C-4CD4-94D5-0319D14DB54B}.Debug|x86.Build.0 = Debug|Any CPU
{6992D926-AB1C-4CD4-94D5-0319D14DB54B}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
{6992D926-AB1C-4CD4-94D5-0319D14DB54B}.Proto|Any CPU.Build.0 = Debug|Any CPU
{6992D926-AB1C-4CD4-94D5-0319D14DB54B}.Proto|x86.ActiveCfg = Debug|Any CPU
{6992D926-AB1C-4CD4-94D5-0319D14DB54B}.Proto|x86.Build.0 = Debug|Any CPU
{6992D926-AB1C-4CD4-94D5-0319D14DB54B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6992D926-AB1C-4CD4-94D5-0319D14DB54B}.Release|Any CPU.Build.0 = Release|Any CPU
{6992D926-AB1C-4CD4-94D5-0319D14DB54B}.Release|x86.ActiveCfg = Release|Any CPU
{6992D926-AB1C-4CD4-94D5-0319D14DB54B}.Release|x86.Build.0 = Release|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Debug|x86.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -1109,7 +1096,6 @@ Global
{39CDF34B-FB23-49AE-AB27-0975DA379BB5} = {DFB6ADD7-3149-43D9-AFA0-FC4A818B472B}
{CBC96CC7-65AB-46EA-A82E-F6A788DABF80} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
{E31F9B59-FCF1-4D04-8762-C7BB60285A7B} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
{6992D926-AB1C-4CD4-94D5-0319D14DB54B} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
{6734FC6F-B5F3-45E1-9A72-720378BB49C9} = {DFB6ADD7-3149-43D9-AFA0-FC4A818B472B}
{601CD5C1-EAFA-4AE3-8FB9-F667B5728213} = {DFB6ADD7-3149-43D9-AFA0-FC4A818B472B}
{9F9DD315-37DA-4413-928E-1CFC6924B64F} = {DFB6ADD7-3149-43D9-AFA0-FC4A818B472B}
Expand Down
1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Compiler.Service/8.0.400.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### Fixed


* Fix a false positive of the `[<TailCall>]` analysis in combination with async. ([Issue #17237](https://github.com/dotnet/fsharp/issues/17237), [PR #17241](https://github.com/dotnet/fsharp/pull/17241))
* Extended #help directive in fsi to show documentation in the REPL. ([PR #17140](https://github.com/dotnet/fsharp/pull/17140))
* Fix internal error when dotting into delegates with multiple type parameters. ([PR #17227](https://github.com/dotnet/fsharp/pull/17227))
Expand Down
1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Core/8.0.400.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
### Breaking Changes

* Fixed argument exception throwing inconsistency - accessing an out-of-bounds collection index will now throw `ArgumentOutOfRangeException` instead of `ArgumentException` ([#17328](https://github.com/dotnet/fsharp/pull/17328))

2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<FSharpCompilerServiceReleaseNotesVersion>$(FCSMajorVersion)$(FCSMinorVersion)$(FCSBuildVersion)</FSharpCompilerServiceReleaseNotesVersion>
<!-- -->
<!-- The current published nuget package -->
<FSharpCoreShippedPackageVersionValue>8.0.200</FSharpCoreShippedPackageVersionValue>
<FSharpCoreShippedPackageVersionValue>8.0.300</FSharpCoreShippedPackageVersionValue>
<!-- -->
<!-- The pattern for specifying the preview package -->
<FSharpCorePreviewPackageVersionValue>$(FSCorePackageVersionValue)-$(PreReleaseVersionLabel).*</FSharpCorePreviewPackageVersionValue>
Expand Down
1 change: 0 additions & 1 deletion src/Compiler/AbstractIL/ilread.fs
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,6 @@ let mkCacheGeneric lowMem _inbase _nm (sz: int) =
(fun f x -> f x)
else
let mutable cache = null

#if STATISTICS
let mutable _count = 0

Expand Down
13 changes: 9 additions & 4 deletions src/Compiler/Checking/CheckExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,9 @@ let UnifyOverallType (cenv: cenv) (env: TcEnv) m overallTy actualTy =
match overallTy with
| MustConvertTo(isMethodArg, reqdTy) when g.langVersion.SupportsFeature LanguageFeature.AdditionalTypeDirectedConversions ->
let actualTy = tryNormalizeMeasureInType g actualTy
let reqdTy = tryNormalizeMeasureInType g reqdTy
if AddCxTypeEqualsTypeUndoIfFailed env.DisplayEnv cenv.css m reqdTy actualTy then
let reqdTy = tryNormalizeMeasureInType g reqdTy
let reqTyForUnification = reqTyForArgumentNullnessInference g actualTy reqdTy
if AddCxTypeEqualsTypeUndoIfFailed env.DisplayEnv cenv.css m reqTyForUnification actualTy then
()
else
// try adhoc type-directed conversions
Expand Down Expand Up @@ -1040,6 +1041,7 @@ let TcAddNullnessToType (warn: bool) (cenv: cenv) (env: TcEnv) nullness innerTyC

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

if not g.compilingFSharpCore && isTyparTy g innerTyC then
// A typar might be later infered into a type not supporting `| null|, like tuple or anon.
Expand Down Expand Up @@ -2995,7 +2997,7 @@ let TcRuntimeTypeTest isCast isOperator (cenv: cenv) denv m tgtTy srcTy =
else
error(Error(FSComp.SR.tcTypeTestErased(NicePrint.minimalStringOfType denv tgtTy, NicePrint.minimalStringOfType denv (stripTyEqnsWrtErasure EraseAll g tgtTy)), m))
else
for ety in getErasedTypes g tgtTy do
for ety in getErasedTypes g tgtTy true do
if isMeasureTy g ety then
warning(Error(FSComp.SR.tcTypeTestLosesMeasures(NicePrint.minimalStringOfType denv ety), m))
else
Expand Down Expand Up @@ -5203,6 +5205,7 @@ and TcPatLongIdentActivePatternCase warnOnUpper (cenv: cenv) (env: TcEnv) vFlags
| TyparConstraint.IsDelegate _
| TyparConstraint.IsEnum _
| TyparConstraint.IsNonNullableStruct _
| TyparConstraint.NotSupportsNull _
| TyparConstraint.IsUnmanaged _
| TyparConstraint.RequiresDefaultConstructor _
| TyparConstraint.SimpleChoice _
Expand Down Expand Up @@ -5340,6 +5343,7 @@ and TcExprFlex (cenv: cenv) flex compat (desiredTy: TType) (env: TcEnv) tpenv (s

if flex then
let argTy = NewInferenceType g
(destTyparTy g argTy).SetSupportsNullFlex(true)
if compat then
(destTyparTy g argTy).SetIsCompatFlex(true)

Expand Down Expand Up @@ -9627,7 +9631,8 @@ and TcEventItemThen (cenv: cenv) overallTy env tpenv mItem mExprAndItem objDetai
| None, false -> error (Error (FSComp.SR.tcEventIsNotStatic nm, mItem))
| _ -> ()

let delTy = einfo.GetDelegateType(cenv.amap, mItem)
// The F# wrappers around events are null safe (impl is in FSharp.Core). Therefore, from an F# perspective, the type of the delegate can be considered Not Null.
let delTy = einfo.GetDelegateType(cenv.amap, mItem) |> replaceNullnessOfTy KnownWithoutNull
let (SigOfFunctionForDelegate(delInvokeMeth, delArgTys, _, _)) = GetSigOfFunctionForDelegate cenv.infoReader delTy mItem ad
let objArgs = Option.toList (Option.map fst objDetails)
MethInfoChecks g cenv.amap true None objArgs env.eAccessRights mItem delInvokeMeth
Expand Down
56 changes: 46 additions & 10 deletions src/Compiler/Checking/ConstraintSolver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ type ConstraintSolverEnv =
// Is this speculative, with a trace allowing undo, and trial method overload resolution
IsSpeculativeForMethodOverloading: bool

// Can this ignore the 'must support null' constraint, e.g. in a mutable assignment scenario
IsSupportsNullFlex: bool

/// Indicates that when unifying ty1 = ty2, only type variables in ty1 may be solved. Constraints
/// can't be added to type variables in ty2
MatchingOnly: bool
Expand Down Expand Up @@ -344,6 +347,7 @@ let MakeConstraintSolverEnv contextInfo css m denv =
EquivEnv = TypeEquivEnv.Empty
DisplayEnv = denv
IsSpeculativeForMethodOverloading = false
IsSupportsNullFlex = false
ExtraRigidTypars = emptyFreeTypars
}

Expand Down Expand Up @@ -953,6 +957,13 @@ let rec SolveTyparEqualsTypePart1 (csenv: ConstraintSolverEnv) m2 (trace: Option
// Record the solution before we solve the constraints, since
// We may need to make use of the equation when solving the constraints.
// Record a entry in the undo trace if one is provided

//let ty1AllowsNull = r.Constraints |> List.exists (function | TyparConstraint.SupportsNull _ -> true | _ -> false )
//let tyAllowsNull() = TypeNullIsExtraValueNew csenv.g m2 ty
//if ty1AllowsNull && not (tyAllowsNull()) then
// trace.Exec (fun () -> r.typar_solution <- Some (ty |> replaceNullnessOfTy csenv.g.knownWithNull)) (fun () -> r.typar_solution <- None)
//else
// trace.Exec (fun () -> r.typar_solution <- Some ty) (fun () -> r.typar_solution <- None)
trace.Exec (fun () -> r.typar_solution <- Some ty) (fun () -> r.typar_solution <- None)
}

Expand Down Expand Up @@ -1051,8 +1062,7 @@ and SolveNullnessEquiv (csenv: ConstraintSolverEnv) m2 (trace: OptionalTrace) ty
// Warn for 'strict "must pass null"` APIs like Option.ofObj
| NullnessInfo.WithNull, NullnessInfo.WithoutNull when shouldWarnUselessNullCheck csenv ->
WarnD(Error(FSComp.SR.tcPassingWithoutNullToANullableExpectingFunc (csenv.SolverState.WarnWhenUsingWithoutNullOnAWithNullTarget.Value),m2))
// Allow expected of WithNull and actual of WithoutNull
// TODO NULLNESS: this is not sound in contravariant cases etc. It is assuming covariance.
// Allow expected of WithNull and actual of WithoutNull except for specially marked APIs (handled above)
| NullnessInfo.WithNull, NullnessInfo.WithoutNull -> CompleteD
| _ ->
if csenv.g.checkNullness then
Expand All @@ -1070,6 +1080,8 @@ and SolveNullnessSubsumesNullness (csenv: ConstraintSolverEnv) m2 (trace: Option
SolveNullnessSubsumesNullness csenv m2 trace ty1 ty2 nv1.Solution nullness2
| _, Nullness.Variable nv2 when nv2.IsSolved ->
SolveNullnessSubsumesNullness csenv m2 trace ty1 ty2 nullness1 nv2.Solution
| Nullness.Variable _nv1, Nullness.Known NullnessInfo.WithoutNull ->
CompleteD
| Nullness.Variable nv1, _ ->
trace.Exec (fun () -> nv1.Set nullness2) (fun () -> nv1.Unset())
CompleteD
Expand Down Expand Up @@ -1218,6 +1230,12 @@ and SolveTypeEqualsType (csenv: ConstraintSolverEnv) ndeep m2 (trace: OptionalTr
let sty1 = stripTyEqnsA csenv.g canShortcut ty1
let sty2 = stripTyEqnsA csenv.g canShortcut ty2

let csenv =
match ty1 with
| TType.TType_var(r,_) when r.typar_flags.IsSupportsNullFlex ->
{ csenv with IsSupportsNullFlex = true}
| _ -> csenv

match sty1, sty2 with
// type vars inside forall-types may be alpha-equivalent
| TType_var (tp1, nullness1), TType_var (tp2, nullness2) when typarEq tp1 tp2 || (match aenv.EquivTypars.TryFind tp1 with | Some tpTy1 when typeEquiv g tpTy1 ty2 -> true | _ -> false) ->
Expand Down Expand Up @@ -1273,6 +1291,15 @@ and SolveTypeEqualsType (csenv: ConstraintSolverEnv) ndeep m2 (trace: OptionalTr
// Unifying 'T1? and 'T2?
| ValueSome NullnessInfo.WithNull, ValueSome NullnessInfo.WithNull ->
SolveTyparEqualsType csenv ndeep m2 trace sty1 (replaceNullnessOfTy g.knownWithoutNull sty2)
| ValueSome NullnessInfo.WithoutNull, ValueSome NullnessInfo.WithoutNull when
csenv.IsSupportsNullFlex &&
isAppTy g sty2 &&
tp1.Constraints |> List.exists (function TyparConstraint.SupportsNull _ -> true | _ -> false) ->
let tpNew = NewCompGenTypar(TyparKind.Type, TyparRigidity.Flexible, TyparStaticReq.None, TyparDynamicReq.No, false)
trackErrors {
do! SolveTypeEqualsType csenv ndeep m2 trace cxsln (TType_var(tpNew, g.knownWithoutNull)) sty2
do! SolveTypeEqualsType csenv ndeep m2 trace cxsln ty1 (TType_var(tpNew, g.knownWithNull))
}
// Unifying 'T1 % and 'T2 %
//| ValueSome NullnessInfo.AmbivalentToNull, ValueSome NullnessInfo.AmbivalentToNull ->
// SolveTyparEqualsType csenv ndeep m2 trace sty1 (replaceNullnessOfTy g.knownWithoutNull sty2)
Expand Down Expand Up @@ -1386,8 +1413,8 @@ and SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln origl1 origl2 =

and SolveFunTypeEqn csenv ndeep m2 trace cxsln domainTy1 domainTy2 rangeTy1 rangeTy2 =
trackErrors {
// TODO NULLNESS: consider whether flipping the actual and expected in argument position
// causes other problems, e.g. better/worse diagnostics
let g = csenv.g
let domainTy2 = reqTyForArgumentNullnessInference g domainTy1 domainTy2
do! SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln domainTy2 domainTy1
return! SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln rangeTy1 rangeTy2
}
Expand Down Expand Up @@ -2354,6 +2381,10 @@ and EnforceConstraintConsistency (csenv: ConstraintSolverEnv) ndeep m2 trace ret
| TyparConstraint.IsNonNullableStruct _, TyparConstraint.IsReferenceType _
| TyparConstraint.IsReferenceType _, TyparConstraint.IsNonNullableStruct _ ->
return! ErrorD (Error(FSComp.SR.csStructConstraintInconsistent(), m))

| TyparConstraint.SupportsNull _, TyparConstraint.NotSupportsNull _
| TyparConstraint.NotSupportsNull _, TyparConstraint.SupportsNull _ ->
return! ErrorD (Error(FSComp.SR.csNullNotNullConstraintInconsistent(), m))

| TyparConstraint.IsUnmanaged _, TyparConstraint.IsReferenceType _
| TyparConstraint.IsReferenceType _, TyparConstraint.IsUnmanaged _ ->
Expand Down Expand Up @@ -2534,16 +2565,18 @@ and SolveTypeUseSupportsNull (csenv: ConstraintSolverEnv) ndeep m2 trace ty =
return! ErrorD (ConstraintSolverError(FSComp.SR.csNullableTypeDoesNotHaveNull(NicePrint.minimalStringOfType denv ty), m, m2))
else
match tryDestTyparTy g ty with
| ValueSome tp ->
| ValueSome tp ->
let nullness = nullnessOfTy g ty
match nullness.TryEvaluate() with
// NULLNESS TODO: This rule means turning on checkNullness changes type inference results for the cases
// mentioned in the comment above. THat's OK but needs to be documented in the RFC.
| ValueNone when not g.checkNullness ->
return! AddConstraint csenv ndeep m2 trace tp (TyparConstraint.SupportsNull m)
| ValueSome NullnessInfo.WithoutNull ->
return! AddConstraint csenv ndeep m2 trace tp (TyparConstraint.SupportsNull m)
| ValueSome NullnessInfo.WithoutNull ->
return! AddConstraint csenv ndeep m2 trace tp (TyparConstraint.SupportsNull m)
| _ ->
if tp.Constraints |> List.exists (function | TyparConstraint.IsReferenceType _ -> true | _ -> false) |> not then
do! AddConstraint csenv ndeep m2 trace tp (TyparConstraint.IsReferenceType m)
return! SolveNullnessSupportsNull csenv ndeep m2 trace ty nullness
| _ ->
let nullness = nullnessOfTy g ty
Expand Down Expand Up @@ -2580,9 +2613,10 @@ and SolveNullnessSupportsNull (csenv: ConstraintSolverEnv) ndeep m2 (trace: Opti
match n1 with
| NullnessInfo.AmbivalentToNull -> ()
| NullnessInfo.WithNull -> ()
| NullnessInfo.WithoutNull ->
| NullnessInfo.WithoutNull ->
if g.checkNullness then
return! WarnD(ConstraintSolverNullnessWarningWithType(denv, ty, n1, m, m2))
// TODO nullness: Shouldn't this be an error? We have a 'must support null' situation which is not being met.
return! WarnD(ConstraintSolverNullnessWarningWithType(denv, ty, n1, m, m2))
}

and SolveTypeUseNotSupportsNull (csenv: ConstraintSolverEnv) ndeep m2 trace ty =
Expand Down Expand Up @@ -2635,7 +2669,9 @@ and SolveTypeCanCarryNullness (csenv: ConstraintSolverEnv) ty nullness =
let m = csenv.m
let strippedTy = stripTyEqnsA g true ty
match tryAddNullnessToTy nullness strippedTy with
| Some _ -> ()
| Some _ ->
if isTyparTy g strippedTy && not (isReferenceTyparTy g strippedTy) then
return! AddConstraint csenv 0 m NoTrace (destTyparTy g strippedTy) (TyparConstraint.IsReferenceType m)
| None ->
let tyString = NicePrint.minimalStringOfType csenv.DisplayEnv strippedTy
return! ErrorD(Error(FSComp.SR.tcTypeDoesNotHaveAnyNull(tyString), m))
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Checking/MethodCalls.fs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ let MakeCalledArgs amap m (minfo: MethInfo) minst =
IsOutArg=isOutArg
ReflArgInfo=reflArgInfo
NameOpt=nmOpt
CalledArgumentType=calledArgTy })
CalledArgumentType= changeWithNullReqTyToVariable amap.g calledArgTy})

/// <summary>
/// Represents the syntactic matching between a caller of a method and the called method.
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Checking/PostInferenceChecks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2555,7 +2555,7 @@ let CheckEntityDefn cenv env (tycon: Entity) =
// Check if it's marked unsafe
let zeroInitUnsafe = TryFindFSharpBoolAttribute g g.attrib_DefaultValueAttribute f.FieldAttribs
if zeroInitUnsafe = Some true then
if not (TypeHasDefaultValue g m ty) then
if not (TypeHasDefaultValue g m f.FormalType) then
errorR(Error(FSComp.SR.chkValueWithDefaultValueMustHaveDefaultValue(), m))

// Check type abbreviations
Expand Down
Loading