Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit099c3db

Browse files
author
dotnet-automerge-bot
authored
Merge pull requestdotnet#5896 from Microsoft/merges/dev15.9-to-master
Merge dev15.9 to master
2 parentsace88e6 +e7af13d commit099c3db

File tree

435 files changed

+2418
-1526
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

435 files changed

+2418
-1526
lines changed

‎src/buildfromsource/FSharp.Compiler.Private/FSComp.fs‎

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3197,10 +3197,10 @@ type internal SR private() =
31973197
/// (Originally from ..\FSComp.txt:1044)
31983198
static membertastInvalidAddressOfMutableAcrossAssemblyBoundary()=(1188, GetStringFunc("tastInvalidAddressOfMutableAcrossAssemblyBoundary",",,,"))
31993199
/// Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name.
3200-
/// (Originally from ..\FSComp.txt:1043)
3200+
/// (Originally from ..\FSComp.txt:1045)
32013201
static memberparsNonAdjacentTypars()=(1189, GetStringFunc("parsNonAdjacentTypars",",,,"))
32023202
/// Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name.
3203-
/// (Originally from ..\FSComp.txt:1044)
3203+
/// (Originally from ..\FSComp.txt:1046)
32043204
static memberparsNonAdjacentTyargs()=(1190, GetStringFunc("parsNonAdjacentTyargs",",,,"))
32053205
/// The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>'
32063206
/// (Originally from ..\FSComp.txt:1047)
@@ -4348,45 +4348,57 @@ type internal SR private() =
43484348
/// The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope.
43494349
/// (Originally from ..\FSComp.txt:1440)
43504350
static memberchkNoByrefAddressOfValueFromExpression()=(3228, GetStringFunc("chkNoByrefAddressOfValueFromExpression",",,,"))
4351-
/// The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope.
4352-
/// (Originally from ..\FSComp.txt:1441)
4353-
static memberchkNoReturnOfLimitedSpan()=(3229, GetStringFunc("chkNoReturnOfLimitedSpan",",,,"))
43544351
/// 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.
4355-
/// (Originally from ..\FSComp.txt:1442)
4356-
static memberchkNoWriteToLimitedSpan(a0:System.String)=(3230, GetStringFunc("chkNoWriteToLimitedSpan",",,,%s,,,") a0)
4352+
/// (Originally from ..\FSComp.txt:1441)
4353+
static memberchkNoWriteToLimitedSpan(a0:System.String)=(3229, GetStringFunc("chkNoWriteToLimitedSpan",",,,%s,,,") a0)
43574354
/// A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...'
4358-
/// (Originally from ..\FSComp.txt:1443)
4359-
static membertastValueMustBeLocal()=(3231, GetStringFunc("tastValueMustBeLocal",",,,"))
4355+
/// (Originally from ..\FSComp.txt:1442)
4356+
static membertastValueMustBeLocal()=(3230, GetStringFunc("tastValueMustBeLocal",",,,"))
43604357
/// A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type.
4361-
/// (Originally from ..\FSComp.txt:1444)
4362-
static membertcIsReadOnlyNotStruct()=(3232, GetStringFunc("tcIsReadOnlyNotStruct",",,,"))
4358+
/// (Originally from ..\FSComp.txt:1443)
4359+
static membertcIsReadOnlyNotStruct()=(3231, GetStringFunc("tcIsReadOnlyNotStruct",",,,"))
43634360
/// Struct members cannot return the address of fields of the struct by reference
4364-
/// (Originally from ..\FSComp.txt:1445)
4365-
static memberchkStructsMayNotReturnAddressesOfContents()=(3233, GetStringFunc("chkStructsMayNotReturnAddressesOfContents",",,,"))
4361+
/// (Originally from ..\FSComp.txt:1444)
4362+
static memberchkStructsMayNotReturnAddressesOfContents()=(3232, GetStringFunc("chkStructsMayNotReturnAddressesOfContents",",,,"))
43664363
/// 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.
4367-
/// (Originally from ..\FSComp.txt:1446)
4368-
static memberchkNoByrefLikeFunctionCall()=(3234, GetStringFunc("chkNoByrefLikeFunctionCall",",,,"))
4364+
/// (Originally from ..\FSComp.txt:1445)
4365+
static memberchkNoByrefLikeFunctionCall()=(3233, GetStringFunc("chkNoByrefLikeFunctionCall",",,,"))
43694366
/// 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.
4370-
/// (Originally from ..\FSComp.txt:1447)
4371-
static memberchkNoSpanLikeVariable(a0:System.String)=(3235, GetStringFunc("chkNoSpanLikeVariable",",,,%s,,,") a0)
4367+
/// (Originally from ..\FSComp.txt:1446)
4368+
static memberchkNoSpanLikeVariable(a0:System.String)=(3234, GetStringFunc("chkNoSpanLikeVariable",",,,%s,,,") a0)
43724369
/// 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.
4373-
/// (Originally from ..\FSComp.txt:1448)
4374-
static memberchkNoSpanLikeValueFromExpression()=(3236, GetStringFunc("chkNoSpanLikeValueFromExpression",",,,"))
4370+
/// (Originally from ..\FSComp.txt:1447)
4371+
static memberchkNoSpanLikeValueFromExpression()=(3235, GetStringFunc("chkNoSpanLikeValueFromExpression",",,,"))
43754372
/// Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address.
4373+
/// (Originally from ..\FSComp.txt:1448)
4374+
static membertastCantTakeAddressOfExpression()=(3236, GetStringFunc("tastCantTakeAddressOfExpression",",,,"))
4375+
/// Cannot call the byref extension method '%s. The first parameter requires the value to be mutable or a non-readonly byref type.
43764376
/// (Originally from ..\FSComp.txt:1449)
4377-
static membertastCantTakeAddressOfExpression()=(3237, GetStringFunc("tastCantTakeAddressOfExpression",",,,"))
4378-
///This type does notinherit Attribute, it will not work correctly with other .NET languages.
4377+
static membertcCannotCallExtensionMethodInrefToByref(a0:System.String)=(3237, GetStringFunc("tcCannotCallExtensionMethodInrefToByref",",,,%s,,,")a0)
4378+
///Byref types are notallowed to have optional type extensions.
43794379
/// (Originally from ..\FSComp.txt:1450)
4380+
static membertcByrefsMayNotHaveTypeExtensions()=(3238, GetStringFunc("tcByrefsMayNotHaveTypeExtensions",",,,"))
4381+
/// Cannot partially apply the extension method '%s' because the first parameter is a byref type.
4382+
/// (Originally from ..\FSComp.txt:1451)
4383+
static membertcCannotPartiallyApplyExtensionMethodForByref(a0:System.String)=(3239, GetStringFunc("tcCannotPartiallyApplyExtensionMethodForByref",",,,%s,,,") a0)
4384+
/// This type does not inherit Attribute, it will not work correctly with other .NET languages.
4385+
/// (Originally from ..\FSComp.txt:1452)
43804386
static membertcTypeDoesNotInheritAttribute()=(3242, GetStringFunc("tcTypeDoesNotInheritAttribute",",,,"))
43814387
/// Invalid anonymous record expression
4382-
/// (Originally from ..\FSComp.txt:1451)
4388+
/// (Originally from ..\FSComp.txt:1453)
43834389
static memberparsInvalidAnonRecdExpr()=(3243, GetStringFunc("parsInvalidAnonRecdExpr",",,,"))
43844390
/// Invalid anonymous record type
4385-
/// (Originally from ..\FSComp.txt:1452)
4391+
/// (Originally from ..\FSComp.txt:1454)
43864392
static memberparsInvalidAnonRecdType()=(3244, GetStringFunc("parsInvalidAnonRecdType",",,,"))
43874393
/// The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record
4388-
/// (Originally from ..\FSComp.txt:1453)
4394+
/// (Originally from ..\FSComp.txt:1455)
43894395
static membertcCopyAndUpdateNeedsRecordType()=(3245, GetStringFunc("tcCopyAndUpdateNeedsRecordType",",,,"))
4396+
/// The parameter '%s' has an invalid type '%s'. This is not permitted by the rules of Common IL.
4397+
/// (Originally from ..\FSComp.txt:1456)
4398+
static memberchkInvalidFunctionParameterType(a0:System.String,a1:System.String)=(3300, GetStringFunc("chkInvalidFunctionParameterType",",,,%s,,,%s,,,") a0 a1)
4399+
/// The function or method has an invalid return type '%s'. This is not permitted by the rules of Common IL.
4400+
/// (Originally from ..\FSComp.txt:1457)
4401+
static memberchkInvalidFunctionReturnType(a0:System.String)=(3301, GetStringFunc("chkInvalidFunctionReturnType",",,,%s,,,") a0)
43904402

43914403
/// Call this method once to validate that all known resources are valid; throws if not
43924404
static memberRunStartupValidation()=
@@ -5801,7 +5813,6 @@ type internal SR private() =
58015813
ignore(GetString("tcByrefReturnImplicitlyDereferenced"))
58025814
ignore(GetString("tcByRefLikeNotStruct"))
58035815
ignore(GetString("chkNoByrefAddressOfValueFromExpression"))
5804-
ignore(GetString("chkNoReturnOfLimitedSpan"))
58055816
ignore(GetString("chkNoWriteToLimitedSpan"))
58065817
ignore(GetString("tastValueMustBeLocal"))
58075818
ignore(GetString("tcIsReadOnlyNotStruct"))
@@ -5810,8 +5821,13 @@ type internal SR private() =
58105821
ignore(GetString("chkNoSpanLikeVariable"))
58115822
ignore(GetString("chkNoSpanLikeValueFromExpression"))
58125823
ignore(GetString("tastCantTakeAddressOfExpression"))
5824+
ignore(GetString("tcCannotCallExtensionMethodInrefToByref"))
5825+
ignore(GetString("tcByrefsMayNotHaveTypeExtensions"))
5826+
ignore(GetString("tcCannotPartiallyApplyExtensionMethodForByref"))
58135827
ignore(GetString("tcTypeDoesNotInheritAttribute"))
58145828
ignore(GetString("parsInvalidAnonRecdExpr"))
58155829
ignore(GetString("parsInvalidAnonRecdType"))
58165830
ignore(GetString("tcCopyAndUpdateNeedsRecordType"))
5831+
ignore(GetString("chkInvalidFunctionParameterType"))
5832+
ignore(GetString("chkInvalidFunctionReturnType"))
58175833
()

‎src/buildfromsource/FSharp.Compiler.Private/FSComp.resx‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4351,9 +4351,6 @@
43514351
<dataname="chkNoByrefAddressOfValueFromExpression"xml:space="preserve">
43524352
<value>The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope.</value>
43534353
</data>
4354-
<dataname="chkNoReturnOfLimitedSpan"xml:space="preserve">
4355-
<value>The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope.</value>
4356-
</data>
43574354
<dataname="chkNoWriteToLimitedSpan"xml:space="preserve">
43584355
<value>This value can't be assigned because the target '{0}' 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.</value>
43594356
</data>
@@ -4378,6 +4375,15 @@
43784375
<dataname="tastCantTakeAddressOfExpression"xml:space="preserve">
43794376
<value>Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address.</value>
43804377
</data>
4378+
<dataname="tcCannotCallExtensionMethodInrefToByref"xml:space="preserve">
4379+
<value>Cannot call the byref extension method '{0}. The first parameter requires the value to be mutable or a non-readonly byref type.</value>
4380+
</data>
4381+
<dataname="tcByrefsMayNotHaveTypeExtensions"xml:space="preserve">
4382+
<value>Byref types are not allowed to have optional type extensions.</value>
4383+
</data>
4384+
<dataname="tcCannotPartiallyApplyExtensionMethodForByref"xml:space="preserve">
4385+
<value>Cannot partially apply the extension method '{0}' because the first parameter is a byref type.</value>
4386+
</data>
43814387
<dataname="tcTypeDoesNotInheritAttribute"xml:space="preserve">
43824388
<value>This type does not inherit Attribute, it will not work correctly with other .NET languages.</value>
43834389
</data>
@@ -4390,4 +4396,10 @@
43904396
<dataname="tcCopyAndUpdateNeedsRecordType"xml:space="preserve">
43914397
<value>The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record</value>
43924398
</data>
4399+
<dataname="chkInvalidFunctionParameterType"xml:space="preserve">
4400+
<value>The parameter '{0}' has an invalid type '{1}'. This is not permitted by the rules of Common IL.</value>
4401+
</data>
4402+
<dataname="chkInvalidFunctionReturnType"xml:space="preserve">
4403+
<value>The function or method has an invalid return type '{0}'. This is not permitted by the rules of Common IL.</value>
4404+
</data>
43934405
</root>

‎src/fsharp/ConstraintSolver.fs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2843,6 +2843,7 @@ let IsApplicableMethApprox g amap m (minfo:MethInfo) availObjTy =
28432843
letminst= FreshenMethInfo m minfo
28442844
match minfo.GetObjArgTypes(amap, m, minst)with
28452845
|[reqdObjTy]->
2846+
letreqdObjTy=if isByrefTy g reqdObjTythen destByrefTy g reqdObjTyelse reqdObjTy// This is to support byref extension methods.
28462847
TryD(fun()-> SolveTypeSubsumesType csenv0 m NoTrace None reqdObjTy availObjTy++(fun()-> ResultDtrue))
28472848
(fun _err-> ResultDfalse)
28482849
|> CommitOperationResult

‎src/fsharp/FSComp.txt‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,16 +1438,20 @@ notAFunctionButMaybeDeclaration,"This value is not a function and cannot be appl
14381438
3226,tcByrefReturnImplicitlyDereferenced,"A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'."
14391439
3227,tcByRefLikeNotStruct,"A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type."
14401440
3228,chkNoByrefAddressOfValueFromExpression,"The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope."
1441-
3229,chkNoReturnOfLimitedSpan,"The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope."
1442-
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."
1443-
3231,tastValueMustBeLocal,"A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...'"
1444-
3232,tcIsReadOnlyNotStruct,"A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type."
1445-
3233,chkStructsMayNotReturnAddressesOfContents,"Struct members cannot return the address of fields of the struct by reference"
1446-
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."
1447-
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."
1448-
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."
1449-
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."
1441+
3229,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."
1442+
3230,tastValueMustBeLocal,"A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...'"
1443+
3231,tcIsReadOnlyNotStruct,"A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type."
1444+
3232,chkStructsMayNotReturnAddressesOfContents,"Struct members cannot return the address of fields of the struct by reference"
1445+
3233,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."
1446+
3234,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."
1447+
3235,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."
1448+
3236,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."
1449+
3237,tcCannotCallExtensionMethodInrefToByref,"Cannot call the byref extension method '%s. The first parameter requires the value to be mutable or a non-readonly byref type."
1450+
3238,tcByrefsMayNotHaveTypeExtensions,"Byref types are not allowed to have optional type extensions."
1451+
3239,tcCannotPartiallyApplyExtensionMethodForByref,"Cannot partially apply the extension method '%s' because the first parameter is a byref type."
14501452
3242,tcTypeDoesNotInheritAttribute,"This type does not inherit Attribute, it will not work correctly with other .NET languages."
14511453
3243,parsInvalidAnonRecdExpr,"Invalid anonymous record expression"
14521454
3244,parsInvalidAnonRecdType,"Invalid anonymous record type"
14531455
3245,tcCopyAndUpdateNeedsRecordType,"The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record"
1456+
3300,chkInvalidFunctionParameterType,"The parameter '%s' has an invalid type '%s'. This is not permitted by the rules of Common IL."
1457+
3301,chkInvalidFunctionReturnType,"The function or method has an invalid return type '%s'. This is not permitted by the rules of Common IL."

‎src/fsharp/FSharp.Build/xlf/FSBuild.txt.cs.xlf‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<xliffxmlns="urn:oasis:names:tc:xliff:document:1.2"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="1.2"xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<filedatatype="xml"source-language="en"target-language="cs"original="../FSBuild.resx">
44
<body>

‎src/fsharp/FSharp.Build/xlf/FSBuild.txt.de.xlf‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<xliffxmlns="urn:oasis:names:tc:xliff:document:1.2"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="1.2"xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<filedatatype="xml"source-language="en"target-language="de"original="../FSBuild.resx">
44
<body>

‎src/fsharp/FSharp.Build/xlf/FSBuild.txt.es.xlf‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<xliffxmlns="urn:oasis:names:tc:xliff:document:1.2"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="1.2"xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<filedatatype="xml"source-language="en"target-language="es"original="../FSBuild.resx">
44
<body>

‎src/fsharp/FSharp.Build/xlf/FSBuild.txt.fr.xlf‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<xliffxmlns="urn:oasis:names:tc:xliff:document:1.2"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="1.2"xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<filedatatype="xml"source-language="en"target-language="fr"original="../FSBuild.resx">
44
<body>

‎src/fsharp/FSharp.Build/xlf/FSBuild.txt.it.xlf‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<xliffxmlns="urn:oasis:names:tc:xliff:document:1.2"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="1.2"xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<filedatatype="xml"source-language="en"target-language="it"original="../FSBuild.resx">
44
<body>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp