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
/// The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope.
/// A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope.
Copy file name to clipboardExpand all lines: src/fsharp/FSComp.txt
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1435,8 +1435,8 @@ notAFunctionButMaybeDeclaration,"This value is not a function and cannot be appl
1435
1435
3230,chkNoWriteToLimitedSpan,"This value can't be assigned because the target '%s' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope."
1436
1436
3231,tastValueMustBeLocal,"A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...'"
1437
1437
3232,tcIsReadOnlyNotStruct,"A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type."
1438
-
3234,chkStructsMayNotReturnAddressesOfContents,"Struct members cannot return the address of fields of the struct by reference"
1439
-
3235,chkNoByrefLikeFunctionCall,"The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope."
1440
-
3236,chkNoSpanLikeVariable,"The Span or IsByRefLike variable '%s' cannot be used at this point. This is to ensure the address of the local value does not escape its scope."
1441
-
3237,chkNoSpanLikeValueFromExpression,"A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope."
1442
-
3238,tastCantTakeAddressOfExpression,"Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address."
1438
+
3233,chkStructsMayNotReturnAddressesOfContents,"Struct members cannot return the address of fields of the struct by reference"
1439
+
3234,chkNoByrefLikeFunctionCall,"The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope."
1440
+
3235,chkNoSpanLikeVariable,"The Span or IsByRefLike variable '%s' cannot be used at this point. This is to ensure the address of the local value does not escape its scope."
1441
+
3236,chkNoSpanLikeValueFromExpression,"A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope."
1442
+
3237,tastCantTakeAddressOfExpression,"Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address."
Copy file name to clipboardExpand all lines: tests/fsharp/core/byrefs/test.bsl
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -43,11 +43,11 @@ test.fsx(66,34,66,47): typecheck error FS1204: This construct is for use in the
43
43
44
44
test.fsx(66,34,66,47): typecheck error FS1204: This construct isfor usein the FSharp.Core libraryand shouldnot be used directly
45
45
46
-
test.fsx(71,21,71,23): typecheck errorFS3238: Cannot take the address of the value returned from the expression. Assign the returned valueto a let-bound value before taking the address.
46
+
test.fsx(71,21,71,23): typecheck errorFS3237: Cannot take the address of the value returned from the expression. Assign the returned valueto a let-bound value before taking the address.
47
47
48
-
test.fsx(72,21,72,23): typecheck errorFS3238: Cannot take the address of the value returned from the expression. Assign the returned valueto a let-bound value before taking the address.
48
+
test.fsx(72,21,72,23): typecheck errorFS3237: Cannot take the address of the value returned from the expression. Assign the returned valueto a let-bound value before taking the address.
49
49
50
-
test.fsx(78,21,78,37): typecheck errorFS3238: Cannot take the address of the value returned from the expression. Assign the returned valueto a let-bound value before taking the address.
50
+
test.fsx(78,21,78,37): typecheck errorFS3237: Cannot take the address of the value returned from the expression. Assign the returned valueto a let-bound value before taking the address.
51
51
52
52
test.fsx(85,22,85,23): typecheck error FS0001: This expression was expectedto have type
Copy file name to clipboardExpand all lines: tests/fsharp/core/span/test.bsl
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
2
-
test.fsx(303,46,303,86): typecheck errorFS3235: The functionor method call cannot be used at this point, because one argument that is a byref of a non-stack-local Spanor IsByRefLike type is used with another argument that is a stack-local Spanor IsByRefLike type. This isto ensure the address of the local value doesnot escape its scope.
2
+
test.fsx(303,46,303,86): typecheck errorFS3234: The functionor method call cannot be used at this point, because one argument that is a byref of a non-stack-local Spanor IsByRefLike type is used with another argument that is a stack-local Spanor IsByRefLike type. This isto ensure the address of the local value doesnot escape its scope.
3
3
4
4
test.fsx(306,13,306,86): typecheck error FS3230: This value can't be assigned because the target 'param1' may referto non-stack-local memory,while the expression being assigned is assessedto potentially referto stack-local memory. This isto help prevent pointersto stack-bound memory escaping their scope.
Copy file name to clipboardExpand all lines: tests/fsharp/core/span/test2.bsl
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -25,25 +25,25 @@ test2.fsx(119,14,119,37): typecheck error FS3228: The address of a value returne
25
25
26
26
test2.fsx(124,14,124,15): typecheck error FS3209: The address of the variable 'y'or a related expression cannot be used at this point. This isto ensure the address of the local value doesnot escape its scope.
27
27
28
-
test2.fsx(128,13,128,42): typecheck errorFS3237: A Spanor IsByRefLike value returned from the expression cannot be used at ths point. This isto ensure the address of the local value doesnot escape its scope.
28
+
test2.fsx(128,13,128,42): typecheck errorFS3236: A Spanor IsByRefLike value returned from the expression cannot be used at ths point. This isto ensure the address of the local value doesnot escape its scope.
29
29
30
30
test2.fsx(132,14,132,41): typecheck error FS3228: The address of a value returned from the expression cannot be used at this point. This isto ensure the address of the local value doesnot escape its scope.
31
31
32
32
test2.fsx(136,14,136,71): typecheck error FS3228: The address of a value returned from the expression cannot be used at this point. This isto ensure the address of the local value doesnot escape its scope.
33
33
34
-
test2.fsx(140,13,140,52): typecheck errorFS3237: A Spanor IsByRefLike value returned from the expression cannot be used at ths point. This isto ensure the address of the local value doesnot escape its scope.
34
+
test2.fsx(140,13,140,52): typecheck errorFS3236: A Spanor IsByRefLike value returned from the expression cannot be used at ths point. This isto ensure the address of the local value doesnot escape its scope.
35
35
36
-
test2.fsx(144,13,144,14): typecheck errorFS3236: The Spanor IsByRefLike variable 's' cannot be used at this point. This isto ensure the address of the local value doesnot escape its scope.
36
+
test2.fsx(144,13,144,14): typecheck errorFS3235: The Spanor IsByRefLike variable 's' cannot be used at this point. This isto ensure the address of the local value doesnot escape its scope.
37
37
38
-
test2.fsx(149,13,149,52): typecheck errorFS3237: A Spanor IsByRefLike value returned from the expression cannot be used at ths point. This isto ensure the address of the local value doesnot escape its scope.
38
+
test2.fsx(149,13,149,52): typecheck errorFS3236: A Spanor IsByRefLike value returned from the expression cannot be used at ths point. This isto ensure the address of the local value doesnot escape its scope.
39
39
40
-
test2.fsx(153,21,153,84): typecheck errorFS3235: The functionor method call cannot be used at this point, because one argument that is a byref of a non-stack-local Spanor IsByRefLike type is used with another argument that is a stack-local Spanor IsByRefLike type. This isto ensure the address of the local value doesnot escape its scope.
40
+
test2.fsx(153,21,153,84): typecheck errorFS3234: The functionor method call cannot be used at this point, because one argument that is a byref of a non-stack-local Spanor IsByRefLike type is used with another argument that is a stack-local Spanor IsByRefLike type. This isto ensure the address of the local value doesnot escape its scope.
41
41
42
-
test2.fsx(154,13,154,14): typecheck errorFS3236: The Spanor IsByRefLike variable 'y' cannot be used at this point. This isto ensure the address of the local value doesnot escape its scope.
42
+
test2.fsx(154,13,154,14): typecheck errorFS3235: The Spanor IsByRefLike variable 'y' cannot be used at this point. This isto ensure the address of the local value doesnot escape its scope.
43
43
44
-
test2.fsx(158,13,158,83): typecheck errorFS3237: A Spanor IsByRefLike value returned from the expression cannot be used at ths point. This isto ensure the address of the local value doesnot escape its scope.
44
+
test2.fsx(158,13,158,83): typecheck errorFS3236: A Spanor IsByRefLike value returned from the expression cannot be used at ths point. This isto ensure the address of the local value doesnot escape its scope.
45
45
46
-
test2.fsx(163,13,163,14): typecheck errorFS3236: The Spanor IsByRefLike variable 'y' cannot be used at this point. This isto ensure the address of the local value doesnot escape its scope.
46
+
test2.fsx(163,13,163,14): typecheck errorFS3235: The Spanor IsByRefLike variable 'y' cannot be used at this point. This isto ensure the address of the local value doesnot escape its scope.
47
47
48
48
test2.fsx(167,14,167,71): typecheck error FS3228: The address of a value returned from the expression cannot be used at this point. This isto ensure the address of the local value doesnot escape its scope.
49
49
@@ -75,4 +75,4 @@ test2.fsx(213,14,213,19): typecheck error FS0437: A type would store a byref typ
75
75
76
76
test2.fsx(222,18,222,23): typecheck error FS3228: The address of a value returned from the expression cannot be used at this point. This isto ensure the address of the local value doesnot escape its scope.
77
77
78
-
test2.fsx(231,17,231,18): typecheck errorFS3236: The Spanor IsByRefLike variable 's' cannot be used at this point. This isto ensure the address of the local value doesnot escape its scope.
78
+
test2.fsx(231,17,231,18): typecheck errorFS3235: The Spanor IsByRefLike variable 's' cannot be used at this point. This isto ensure the address of the local value doesnot escape its scope.
Copy file name to clipboardExpand all lines: tests/fsharp/typecheck/sigs/neg106.bsl
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ is not compatible with type
38
38
'byref<'a>'
39
39
.
40
40
41
-
neg106.fs(17,59,17,61): typecheck errorFS3238: Cannot take the address of the value returned from the expression. Assign the returned valueto a let-bound value before taking the address.
41
+
neg106.fs(17,59,17,61): typecheck errorFS3237: Cannot take the address of the value returned from the expression. Assign the returned valueto a let-bound value before taking the address.
42
42
43
43
neg106.fs(17,14,17,68): typecheck error FS0041: No overloads matchfor method 'CompareExchange'. The available overloads are shown below.
44
44
neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref<int>, value: int, comparand: int) : int'. Type constraint mismatch. The type
Copy file name to clipboardExpand all lines: tests/fsharp/typecheck/sigs/neg106.vsbsl
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ is not compatible with type
38
38
'byref<'a>'
39
39
.
40
40
41
-
neg106.fs(17,59,17,61): typecheck errorFS3238: Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address.
41
+
neg106.fs(17,59,17,61): typecheck errorFS3237: Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address.
42
42
43
43
neg106.fs(17,14,17,68): typecheck error FS0041: No overloads match for method 'CompareExchange'. The available overloads are shown below.
44
44
neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref<int>, value: int, comparand: int) : int'. Type constraint mismatch. The type