You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/release-notes/.FSharp.Compiler.Service/10.0.100.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,9 @@
18
18
* Fix active pattern typechecking regression. ([Issue #18638](https://github.com/dotnet/fsharp/issues/18638), [PR #18642](https://github.com/dotnet/fsharp/pull/18642))
19
19
* Fix nullness warnings when casting non-nullable values to `IEquatable<T>` to match C# behavior. ([Issue #18759](https://github.com/dotnet/fsharp/issues/18759))
20
20
* Fix IsByRefLikeAttribute types being incorrectly suppressed in completion lists. Types like `Span<T>` and `ReadOnlySpan<T>` now appear correctly in IntelliSense.
21
-
22
21
* Fix SRTP nullness constraint resolution for types imported from older assemblies. AmbivalentToNull types now use legacy F# nullness rules instead of always satisfying `'T : null` constraints. ([Issue #18390](https://github.com/dotnet/fsharp/issues/18390), [Issue #18344](https://github.com/dotnet/fsharp/issues/18344))
23
22
* Fix Show XML doc for enum fields in external metadata ([Issue #17939](https://github.com/dotnet/fsharp/issues/17939#issuecomment-3137410105), [PR #18800](https://github.com/dotnet/fsharp/pull/18800))
23
+
* Fix nullable types formatting in `FSharpType.Format` and tooltips to include parentheses. ([PR #18842](https://github.com/dotnet/fsharp/pull/18842))
24
24
* TypeMismatchDiagnosticExtendedData: fix expected and actual types calculation. ([Issue ](https://github.com/dotnet/fsharp/pull/18851))
| x :: rest ->[ resultFunction x (layoutFunction x -- leftL (tagText (match rest.Length with1-> FSComp.SR.nicePrintOtherOverloads1()| n -> FSComp.SR.nicePrintOtherOverloadsN(n))))]
Copy file name to clipboardExpand all lines: tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/ByrefSafetyAnalysis.fs
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -69,29 +69,29 @@ module ByrefSafetyAnalysis =
69
69
(Error 438, Line 113, Col 23, Line 113, Col 33,"Duplicate method. The method 'TestMethod' has the same name and signature as another method in type 'NegativeTests.TestNegativeOverloading'.")
70
70
(Error 412, Line 121, Col 18, Line 121, Col 22,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
71
71
(Error 412, Line 123, Col 18, Line 123, Col 23,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
72
-
(Error 3301, Line 125, Col 9, Line 125, Col 14,"The function or method has an invalid return type '(byref<int> * int)'. This is not permitted by the rules of Common IL.")
72
+
(Error 3301, Line 125, Col 9, Line 125, Col 14,"The function or method has an invalid return type 'byref<int> * int'. This is not permitted by the rules of Common IL.")
73
73
(Error 412, Line 125, Col 34, Line 125, Col 39,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
74
74
(Error 418, Line 125, Col 35, Line 125, Col 36,"The byref typed value 'x' cannot be used at this point")
75
-
(Error 3301, Line 127, Col 9, Line 127, Col 14,"The function or method has an invalid return type '(byref<int> -> unit)'. This is not permitted by the rules of Common IL.")
75
+
(Error 3301, Line 127, Col 9, Line 127, Col 14,"The function or method has an invalid return type 'byref<int> -> unit'. This is not permitted by the rules of Common IL.")
76
76
(Error 412, Line 129, Col 14, Line 129, Col 15,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
77
-
(Error 3300, Line 131, Col 17, Line 131, Col 18,"The parameter 'x' has an invalid type '((byref<int> -> unit) * int)'. This is not permitted by the rules of Common IL.")
78
-
(Error 3300, Line 133, Col 17, Line 133, Col 18,"The parameter 'x' has an invalid type '(byref<int> -> unit)'. This is not permitted by the rules of Common IL.")
79
-
(Error 3300, Line 133, Col 41, Line 133, Col 42,"The parameter 'y' has an invalid type '(byref<int> * int)'. This is not permitted by the rules of Common IL.")
80
-
(Error 3300, Line 139, Col 36, Line 139, Col 39,"The parameter 'tup' has an invalid type '(inref<int> * int)'. This is not permitted by the rules of Common IL.")
77
+
(Error 3300, Line 131, Col 17, Line 131, Col 18,"The parameter 'x' has an invalid type '(byref<int> -> unit) * int'. This is not permitted by the rules of Common IL.")
78
+
(Error 3300, Line 133, Col 17, Line 133, Col 18,"The parameter 'x' has an invalid type 'byref<int> -> unit'. This is not permitted by the rules of Common IL.")
79
+
(Error 3300, Line 133, Col 41, Line 133, Col 42,"The parameter 'y' has an invalid type 'byref<int> * int'. This is not permitted by the rules of Common IL.")
80
+
(Error 3300, Line 139, Col 36, Line 139, Col 39,"The parameter 'tup' has an invalid type 'inref<int> * int'. This is not permitted by the rules of Common IL.")
81
81
(Error 412, Line 140, Col 13, Line 140, Col 33,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
82
-
(Error 3300, Line 142, Col 37, Line 142, Col 38,"The parameter 'x' has an invalid type '(byref<int> -> unit)'. This is not permitted by the rules of Common IL.")
82
+
(Error 3300, Line 142, Col 37, Line 142, Col 38,"The parameter 'x' has an invalid type 'byref<int> -> unit'. This is not permitted by the rules of Common IL.")
83
83
(Error 3300, Line 144, Col 37, Line 144, Col 38,"The parameter 'x' has an invalid type 'byref<int> option'. This is not permitted by the rules of Common IL.")
84
84
(Error 3300, Line 146, Col 17, Line 146, Col 18,"The parameter 'x' has an invalid type 'byref<int> option'. This is not permitted by the rules of Common IL.")
85
85
(Error 412, Line 151, Col 13, Line 151, Col 14,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
86
86
(Error 412, Line 151, Col 17, Line 151, Col 30,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
87
-
(Error 3301, Line 154, Col 9, Line 154, Col 15,"The function or method has an invalid return type '(byref<int> -> unit)'. This is not permitted by the rules of Common IL.")
87
+
(Error 3301, Line 154, Col 9, Line 154, Col 15,"The function or method has an invalid return type 'byref<int> -> unit'. This is not permitted by the rules of Common IL.")
88
88
(Error 412, Line 155, Col 9, Line 155, Col 22,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
89
89
(Error 412, Line 158, Col 13, Line 158, Col 14,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
90
90
(Error 412, Line 160, Col 13, Line 160, Col 26,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
91
91
(Error 412, Line 165, Col 9, Line 165, Col 22,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
92
92
(Error 412, Line 169, Col 13, Line 169, Col 14,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
93
93
(Error 412, Line 169, Col 17, Line 169, Col 28,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
94
-
(Error 3301, Line 172, Col 9, Line 172, Col 15,"The function or method has an invalid return type '(int -> byref<int> -> unit)'. This is not permitted by the rules of Common IL.")
94
+
(Error 3301, Line 172, Col 9, Line 172, Col 15,"The function or method has an invalid return type 'int -> byref<int> -> unit'. This is not permitted by the rules of Common IL.")
95
95
(Error 412, Line 173, Col 9, Line 173, Col 20,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
96
96
(Error 412, Line 176, Col 13, Line 176, Col 14,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
97
97
(Error 412, Line 178, Col 13, Line 178, Col 24,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
@@ -102,7 +102,7 @@ module ByrefSafetyAnalysis =
102
102
(Error 412, Line 191, Col 13, Line 191, Col 14,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
103
103
(Error 412, Line 193, Col 13, Line 193, Col 28,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
104
104
(Error 412, Line 198, Col 9, Line 198, Col 24,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
105
-
(Error 3301, Line 201, Col 9, Line 201, Col 15,"The function or method has an invalid return type '(byref<int> * int)'. This is not permitted by the rules of Common IL.")
105
+
(Error 3301, Line 201, Col 9, Line 201, Col 15,"The function or method has an invalid return type 'byref<int> * int'. This is not permitted by the rules of Common IL.")
106
106
(Error 412, Line 203, Col 10, Line 203, Col 15,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
107
107
(Error 421, Line 203, Col 11, Line 203, Col 12,"The address of the variable 'x' cannot be used at this point")
108
108
(Error 412, Line 206, Col 9, Line 206, Col 18,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
@@ -807,7 +807,7 @@ type outref<'T> with
807
807
|> compile
808
808
|> shouldFail
809
809
|> withDiagnostics [
810
-
(Error 3300, Line 5, Col 18, Line 5, Col 19,"The parameter 'f' has an invalid type '(byref<int> -> 'a)'. This is not permitted by the rules of Common IL.")
810
+
(Error 3300, Line 5, Col 18, Line 5, Col 19,"The parameter 'f' has an invalid type 'byref<int> -> 'a'. This is not permitted by the rules of Common IL.")
811
811
(Error 424, Line 7, Col 6, Line 7, Col 13,"The address of an array element cannot be used at this point")
812
812
(Error 412, Line 9, Col 19, Line 9, Col 20,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
813
813
(Error 412, Line 11, Col 19, Line 11, Col 20,"A type instantiation involves a byref type. This is not permitted by the rules of Common IL.")
Copy file name to clipboardExpand all lines: tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ let main _args =
103
103
|> withDiagnostics
104
104
[ Error 3265, Line 13, Col 13, Line 13, Col 60,"Application of method 'Deserialize' attempted to create a nullable type ('T | null) for '{| x: int |}'. Nullness warnings won't be reported correctly for such types."
105
105
Error 3265, Line 14, Col 13, Line 14, Col 51,"Application of method 'Deserialize' attempted to create a nullable type ('T | null) for 'System.Int32'. Nullness warnings won't be reported correctly for such types."
106
-
Error 3265, Line 15, Col 13, Line 15, Col 59,"Application of method 'Deserialize' attempted to create a nullable type ('T | null) for '(int * float)'. Nullness warnings won't be reported correctly for such types."
106
+
Error 3265, Line 15, Col 13, Line 15, Col 59,"Application of method 'Deserialize' attempted to create a nullable type ('T | null) for 'int * float'. Nullness warnings won't be reported correctly for such types."
107
107
Error 3265, Line 16, Col 13, Line 16, Col 67,"Application of method 'Deserialize' attempted to create a nullable type ('T | null) for 'struct (int * float)'. Nullness warnings won't be reported correctly for such types."
108
108
Error 3265, Line 17, Col 13, Line 17, Col 57,"Application of method 'Deserialize' attempted to create a nullable type ('T | null) for 'int<mykg>'. Nullness warnings won't be reported correctly for such types."
109
109
Error 3265, Line 18, Col 13, Line 18, Col 57,"Application of method 'Deserialize' attempted to create a nullable type ('T | null) for 'int<mykg>'. Nullness warnings won't be reported correctly for such types."]
@@ -152,7 +152,7 @@ let doNotWarnOnDowncastRepeatedNestedNullable(o:objnull) = o :? list<((AB | null
152
152
[ Error 3264, Line 4, Col 39, Line 4, Col 47,"Nullness warning: Downcasting from 'objnull' into 'AB' can introduce unexpected null values. Cast to 'AB|null' instead or handle the null before downcasting."
153
153
Error 3060, Line 5, Col 42, Line 5, Col 59,"This type test or downcast will erase the provided type 'AB | null' to the type 'AB'"
154
154
Error 3060, Line 6, Col 41, Line 6, Col 55,"This type test or downcast will erase the provided type 'AB | null' to the type 'AB'"
155
-
Error 3060, Line 7, Col 51, Line 7, Col 97,"This type test or downcast will erase the provided type 'List<AB | null array | null> | null' to the type 'List<AB array>'"]
155
+
Error 3060, Line 7, Col 51, Line 7, Col 97,"This type test or downcast will erase the provided type 'List<(AB | null) array | null> | null' to the type 'List<AB array>'"]
156
156
157
157
158
158
[<Fact>]
@@ -611,7 +611,7 @@ let f6(x: 'a | null when 'a:null) = ()
611
611
[ Error 3261, Line 3, Col 11, Line 3, Col 32,"Nullness warning: The type 'string option' uses 'null' as a representation value but a non-null type is expected."
612
612
Error 3260, Line 4, Col 11, Line 4, Col 21,"The type 'int' does not support a nullness qualification."
613
613
Error 43, Line 4, Col 11, Line 4, Col 21,"A generic construct requires that the type 'int' have reference semantics, but it does not, i.e. it is a struct"
614
-
Error 3260, Line 5, Col 11, Line 5, Col 25,"The type '('a * 'b)' does not support a nullness qualification."
614
+
Error 3260, Line 5, Col 11, Line 5, Col 25,"The type ''a * 'b' does not support a nullness qualification."
615
615
Error 3261, Line 6, Col 11, Line 6, Col 28,"Nullness warning: The type ''a option' uses 'null' as a representation value but a non-null type is expected."
616
616
Error 43, Line 7, Col 28, Line 7, Col 37,"The constraints 'struct' and 'not struct' are inconsistent"
617
617
Error 43, Line 8, Col 26, Line 8, Col 33,"The constraints 'null' and 'not null' are inconsistent"]
0 commit comments