Uh oh!
There was an error while loading. Please reload this page.
[RFC FS-1060] Nullness checking - #15181
Conversation
* enablement * enablement * fix build * fix build * fantomas * selective adoption
Uh oh!
There was an error while loading. Please reload this page.
Good for spotting this, thumbs up. I created new issues to cover for them. Created to cover these, can be again taken independently |
T-Gro
commented
Jul 12, 2024
It is a compile-time feature without runtime impact. For the compilation times, the e2e build tests under different configurations remained the same as far as I can see (comparing this branch, which does not apply checknulls, and its sibling PR which does). |
psfinaki
commented
Jul 15, 2024
No that makes, it was more about optimization potential in the implementation details. I am totally fine with not adding benchmarks here. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
vzarytovskii
commented
Jul 16, 2024
I intend to merge it. |
psfinaki
left a comment
There was a problem hiding this comment.
I played a lot of with the feature, IMO this definitely passes all the smoke tests, as per other things - see comments.
What would be amazing is to actually update the RFC because it has some TBDs and some inconsistencies, both internal ones (e.g. withNull function) and w.r.t. implementation (e.g. obj | null support). Splitting the helper RFCs will be also benefecial.
Let's ![]()
psfinaki
commented
Jul 16, 2024
@vzarytovskii it's all green now, I fixed the trimming checks. As for the issues, I'd prefer force-merging it with unresolved comments so that @T-Gro can later make sense of them. |
dlidstrom
commented
Jul 17, 2024
It’s fantastic how you are bringing F# forward! 🎉 |
The function-domain unification order change in PR dotnet#15181 (nullness) caused recursive inline SRTP resolution to be truncated by one currying level: an inference variable still carrying an unsolved member constraint could be absorbed by the required domain, merging away the pending recursive trait resolution. This regressed patterns such as FSharpPlus `memoizeN`. SolveFunTypeEqn now keeps the SRTP-constrained inference variable as the unification representative for that specific case, and only when not MatchingOnly (mirroring SolveTypeEqualsType). Adds two ComponentTests (the memoizeN repro across currying depths, and a MatchingOnly overload-resolution guard) and repoints the FSharpPlus regression matrix at a minimal global.json-bump branch that exercises the fix end-to-end. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4cfb1c86-0d7e-45e6-9529-3c5f301c0912
Continuation of #5790 and #6804
This is a prototype implementation of RFC FS-1060 nullable reference types
See tests\adhoc\nullness for testing and samples including baselines of outputs from
/langversion:preview/langversion:preview /checknullsTODO:
string | nulland: not null(@T-Gro )Import+ExportTODOs (to test and adjust if needed)System.Collections.Generic.List<string | null>)The types 'System.String (...)' and 'System.String (...)' do not have compatible nullability.which is wrong - either the nullability aren't shown for some reason or the types should be considered compatibleTesting:
To be moved to RFC and resolved, then tested here:
if x then null else ""andif x then "" else null