From 26645aeeb4ca2ded7aa2444bf71f2dc4afdecaf9 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Wed, 7 Aug 2024 16:27:23 +0100 Subject: [PATCH 01/13] tests when calling protected static base member from `static do` (#17484) Co-authored-by: Kevin Ransom (msft) --- .../RealInternalSignature.fs | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/RealInternalSignature.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/RealInternalSignature.fs index b0b12e502d0a..d40a8b5484cd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/RealInternalSignature.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/RealInternalSignature.fs @@ -1253,3 +1253,56 @@ module Test6 |> asLibrary |> compile |> shouldSucceed + + [] + let ``Calling protected static base member from `static do` does not raise MethodAccessException when --realsig+`` () = + FSharp """ +#nowarn "44" // using Uri.EscapeString just because it's protected static + +type C(str : string) = + inherit System.Uri(str) + + static do + System.Uri.EscapeString("http://www.myserver.com") |> ignore + printfn "Hello, World" + +module M = + [] + let main args = + let res = C("http://www.myserver.com") + 0 + """ + |> withLangVersionPreview + |> withRealInternalSignature true + |> asLibrary + |> compile + |> compileExeAndRun + |> shouldSucceed + |> withStdOutContainsAllInOrder [ + "Hello, World" + ] + + [] + let ``Calling protected static base member from `static do` raises MethodAccessException with --realsig-`` () = + FSharp """ +#nowarn "44" // using Uri.EscapeString just because it's protected static + +type C(str : string) = + inherit System.Uri(str) + + static do + System.Uri.EscapeString("http://www.myserver.com") |> ignore + printfn "Hello, World" + +module M = + [] + let main args = + let res = C("http://www.myserver.com") + 0 + """ + |> withLangVersionPreview + |> withRealInternalSignature false + |> asLibrary + |> compile + |> compileExeAndRun + |> shouldFail \ No newline at end of file From ccee270f64e19d57838fe105445b9c49686816e2 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Wed, 7 Aug 2024 16:37:59 +0100 Subject: [PATCH 02/13] Fix object-expr untested cases (#17476) * Fix object-expr untested case * Update condition to cover new found cases * Better test names * one more test --------- Co-authored-by: Kevin Ransom (msft) --- .../Checking/Expressions/CheckExpressions.fs | 32 ++++--- .../Expressions/CheckSequenceExpressions.fs | 8 -- .../ObjectExpressions/ObjectExpressions.fs | 87 +++++++++++++++++++ 3 files changed, 102 insertions(+), 25 deletions(-) diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index be64b075e2c1..585939038fba 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -7119,12 +7119,14 @@ and CheckSuperType (cenv: cenv) ty m = and TcObjectExpr (cenv: cenv) env tpenv (objTy, realObjTy, argopt, binds, extraImpls, mObjTy, mNewExpr, mWholeExpr) = let g = cenv.g - match tryTcrefOfAppTy g objTy with | ValueNone -> error(Error(FSComp.SR.tcNewMustBeUsedWithNamedType(), mNewExpr)) | ValueSome tcref -> let isRecordTy = tcref.IsRecordTycon - if not isRecordTy && not (isInterfaceTy g objTy) && isSealedTy g objTy then errorR(Error(FSComp.SR.tcCannotCreateExtensionOfSealedType(), mNewExpr)) + let isInterfaceTy = isInterfaceTy g objTy + let isFSharpObjModelTy = isFSharpObjModelTy g objTy + let isOverallTyAbstract = HasFSharpAttribute g g.attrib_AbstractClassAttribute tcref.Attribs + if not isRecordTy && not isInterfaceTy && isSealedTy g objTy then errorR(Error(FSComp.SR.tcCannotCreateExtensionOfSealedType(), mNewExpr)) CheckSuperType cenv objTy mObjTy @@ -7135,14 +7137,14 @@ and TcObjectExpr (cenv: cenv) env tpenv (objTy, realObjTy, argopt, binds, extraI let env = EnterFamilyRegion tcref env let ad = env.AccessRights - if // record construction ? + if // record construction ? e.g { A = 1; B = 2 } isRecordTy || - // object construction? - (isFSharpObjModelTy g objTy && not (isInterfaceTy g objTy) && argopt.IsNone) then + // object construction? e.g. new A() { ... } + (isFSharpObjModelTy && not isInterfaceTy && argopt.IsNone) then if argopt.IsSome then error(Error(FSComp.SR.tcNoArgumentsForRecordValue(), mWholeExpr)) if not (isNil extraImpls) then error(Error(FSComp.SR.tcNoInterfaceImplementationForConstructionExpression(), mNewExpr)) - if isFSharpObjModelTy g objTy && GetCtorShapeCounter env <> 1 then + if isFSharpObjModelTy && GetCtorShapeCounter env <> 1 then error(Error(FSComp.SR.tcObjectConstructionCanOnlyBeUsedInClassTypes(), mNewExpr)) let fldsList = binds |> List.map (fun b -> @@ -7152,8 +7154,9 @@ and TcObjectExpr (cenv: cenv) env tpenv (objTy, realObjTy, argopt, binds, extraI TcRecordConstruction cenv objTy true env tpenv None objTy fldsList mWholeExpr else + // object expression construction e.g. { new A() with ... } or { new IA with ... } let ctorCall, baseIdOpt, tpenv = - if isInterfaceTy g objTy then + if isInterfaceTy then match argopt with | None -> BuildObjCtorCall g mWholeExpr, None, tpenv @@ -7162,7 +7165,7 @@ and TcObjectExpr (cenv: cenv) env tpenv (objTy, realObjTy, argopt, binds, extraI else let item = ForceRaise (ResolveObjectConstructor cenv.nameResolver env.DisplayEnv mObjTy ad objTy) - if isFSharpObjModelTy g objTy && GetCtorShapeCounter env = 1 then + if isFSharpObjModelTy && GetCtorShapeCounter env = 1 then error(Error(FSComp.SR.tcObjectsMustBeInitializedWithObjectExpression(), mNewExpr)) match item, argopt with @@ -7193,14 +7196,6 @@ and TcObjectExpr (cenv: cenv) env tpenv (objTy, realObjTy, argopt, binds, extraI overridesAndVirts |> List.iter (fun (m, implTy, dispatchSlots, dispatchSlotsKeyed, availPriorOverrides, overrides) -> let overrideSpecs = overrides |> List.map fst let hasStaticMembers = dispatchSlots |> List.exists (fun reqdSlot -> not reqdSlot.MethodInfo.IsInstance) - let isOverallTyAbstract = - match tryTcrefOfAppTy g objTy with - | ValueNone -> false - | ValueSome tcref -> HasFSharpAttribute g g.attrib_AbstractClassAttribute tcref.Attribs - - if overrideSpecs.IsEmpty && not (isInterfaceTy g objTy) then - errorR (Error(FSComp.SR.tcInvalidObjectExpressionSyntaxForm (), mWholeExpr)) - if hasStaticMembers then errorR(Error(FSComp.SR.chkStaticMembersOnObjectExpressions(), mObjTy)) @@ -7240,8 +7235,11 @@ and TcObjectExpr (cenv: cenv) env tpenv (objTy, realObjTy, argopt, binds, extraI let objtyR, overrides' = allTypeImpls.Head assert (typeEquiv g objTy objtyR) let extraImpls = allTypeImpls.Tail + + if not isInterfaceTy && (isOverallTyAbstract && overrides'.IsEmpty) && extraImpls.IsEmpty then + errorR (Error(FSComp.SR.tcInvalidObjectExpressionSyntaxForm (), mWholeExpr)) - // 7. Build the implementation + // 4. Build the implementation let expr = mkObjExpr(objtyR, baseValOpt, ctorCall, overrides', extraImpls, mWholeExpr) let expr = mkCoerceIfNeeded g realObjTy objtyR expr expr, tpenv diff --git a/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs b/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs index 09de598b18cd..31be49131ab5 100644 --- a/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs @@ -444,20 +444,12 @@ let TcSequenceExpressionEntry (cenv: TcFileState) env (overallTy: OverallTy) tpe match RewriteRangeExpr comp with | Some replacementExpr -> TcExpr cenv overallTy env tpenv replacementExpr | None -> - let implicitYieldEnabled = cenv.g.langVersion.SupportsFeature LanguageFeature.ImplicitYield let validateObjectSequenceOrRecordExpression = not implicitYieldEnabled match comp with - | SynExpr.New _ -> - try - TcExprUndelayed cenv overallTy env tpenv comp |> ignore - with RecoverableException e -> - errorRecovery e m - - errorR (Error(FSComp.SR.tcInvalidObjectExpressionSyntaxForm (), m)) | SimpleSemicolonSequence cenv false _ when validateObjectSequenceOrRecordExpression -> errorR (Error(FSComp.SR.tcInvalidObjectSequenceOrRecordExpression (), m)) | _ -> () diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ObjectExpressions/ObjectExpressions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ObjectExpressions/ObjectExpressions.fs index 0a3eb93cf551..33fc4582f269 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ObjectExpressions/ObjectExpressions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ObjectExpressions/ObjectExpressions.fs @@ -33,6 +33,93 @@ let implementer() ={ new IFirst } |> withLangVersion80 |> typecheck |> shouldSucceed + + [] + let ``Object expression can construct an abstract class and also implement interfaces with and without abstract members.`` () = + Fsx """ +type IFirst = interface end + +type ISecond = + abstract member M : unit -> unit + +[] +type MyClass() = class end + +{ new MyClass() with + member x.ToString() = "OK" + + interface IFirst + + interface ISecond with + member this.M() = () } |> ignore + """ + |> withLangVersion80 + |> typecheck + |> shouldSucceed + + [] + let ``Object expression can construct an abstract class(missing with...) and also implement interfaces with and without abstract members.`` () = + Fsx """ +type IFirst = interface end + +type ISecond = + abstract member M : unit -> unit + +[] +type MyClass() = class end + +{ new MyClass() interface IFirst + + interface ISecond with + member this.M() = () } |> ignore + """ + |> withLangVersion80 + |> typecheck + |> shouldSucceed + + [] + let ``Object expression can construct an abstract class(missing with... and interface in the next line) and also implement interfaces with and without abstract members.`` () = + Fsx """ +type IFirst = interface end + +type ISecond = + abstract member M : unit -> unit + +[] +type MyClass() = class end + +{ new MyClass() + interface IFirst + + interface ISecond with + member this.M() = () } |> ignore + """ + |> withLangVersion80 + |> typecheck + |> shouldSucceed + + [] + let ``Verifies that the object expression built type has the interface.`` () = + Fsx """ +type IFirst = interface end + +type ISecond = + abstract member M : unit -> unit + +[] +type MyClass() = + interface ISecond with + member this.M() = printfn "It works" + +let expr = { new MyClass() interface IFirst } +(expr:> ISecond).M() + """ + |> withLangVersion80 + |> compileExeAndRun + |> shouldSucceed + |> withStdOutContainsAllInOrder [ + "It works" + ] [] let ``Parameterized object expression implementing an interface with members`` () = From 0787ef6c0b32b9ab13153b7eba53cdaf06b2726f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 17:48:24 +0200 Subject: [PATCH 03/13] [main] Update dependencies from dotnet/arcade (#17429) * Update dependencies from https://github.com/dotnet/arcade build 20240722.7 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24372.7 * Update dependencies from https://github.com/dotnet/arcade build 20240722.7 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24372.7 * Update dependencies from https://github.com/dotnet/arcade build 20240722.7 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24372.7 * Update dependencies from https://github.com/dotnet/arcade build 20240724.3 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24374.3 * Update dependencies from https://github.com/dotnet/arcade build 20240725.3 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24375.3 * Update dependencies from https://github.com/dotnet/arcade build 20240725.3 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24375.3 * Update dependencies from https://github.com/dotnet/arcade build 20240725.3 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24375.3 * Update dependencies from https://github.com/dotnet/arcade build 20240725.3 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24375.3 * Update dependencies from https://github.com/dotnet/arcade build 20240729.1 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24379.1 * Update dependencies from https://github.com/dotnet/arcade build 20240729.1 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24379.1 * Update dependencies from https://github.com/dotnet/arcade build 20240801.1 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24401.1 * Update dependencies from https://github.com/dotnet/arcade build 20240801.1 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24401.1 * Update dependencies from https://github.com/dotnet/arcade build 20240801.1 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24401.1 * Update dependencies from https://github.com/dotnet/arcade build 20240801.1 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24401.1 * Update dependencies from https://github.com/dotnet/arcade build 20240801.1 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24401.1 * Update dependencies from https://github.com/dotnet/arcade build 20240805.1 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24401.1 -> To Version 9.0.0-beta.24405.1 --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: Vlad Zarytovskii Co-authored-by: Petr --- eng/Version.Details.xml | 8 +-- .../job/publish-build-assets.yml | 32 +++-------- .../job/source-index-stage1.yml | 6 +- .../core-templates/post-build/post-build.yml | 5 +- .../steps/get-federated-access-token.yml | 16 +++++- .../core-templates/steps/publish-logs.yml | 1 - eng/common/cross/build-rootfs.sh | 16 +++--- eng/common/native/init-compiler.sh | 56 +++++++------------ eng/common/post-build/publish-using-darc.ps1 | 1 + global.json | 2 +- 10 files changed, 63 insertions(+), 80 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 618a642e481d..5820fde4b23e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,14 +42,14 @@ - + https://github.com/dotnet/arcade - 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 + 2c829550b968e29389ce8392244da2b006d71301 - + https://github.com/dotnet/arcade - 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 + 2c829550b968e29389ce8392244da2b006d71301 diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index d99a1a3b2840..3d3356e31967 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -113,38 +113,19 @@ jobs: Add-Content -Path $filePath -Value "$(DefaultChannels)" Add-Content -Path $filePath -Value $(IsStableBuild) - - template: /eng/common/core-templates/steps/publish-build-artifacts.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} - args: - displayName: Publish ReleaseConfigs Artifact - pathToPublish: '$(Build.StagingDirectory)/ReleaseConfigs' - publishLocation: Container - artifactName: ReleaseConfigs - - - task: powershell@2 - displayName: Check if SymbolPublishingExclusionsFile.txt exists - inputs: - targetType: inline - script: | $symbolExclusionfile = "$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt" - if(Test-Path -Path $symbolExclusionfile) + if (Test-Path -Path $symbolExclusionfile) { Write-Host "SymbolExclusionFile exists" - Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]true" - } - else{ - Write-Host "Symbols Exclusion file does not exist" - Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]false" + Copy-Item -Path $symbolExclusionfile -Destination "$(Build.StagingDirectory)/ReleaseConfigs" } - template: /eng/common/core-templates/steps/publish-build-artifacts.yml parameters: is1ESPipeline: ${{ parameters.is1ESPipeline }} args: - displayName: Publish SymbolPublishingExclusionsFile Artifact - condition: eq(variables['SymbolExclusionFile'], 'true') - pathToPublish: '$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' + displayName: Publish ReleaseConfigs Artifact + pathToPublish: '$(Build.StagingDirectory)/ReleaseConfigs' publishLocation: Container artifactName: ReleaseConfigs @@ -162,9 +143,10 @@ jobs: scriptType: ps scriptLocation: scriptPath scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) + arguments: > + -BuildId $(BARBuildId) -PublishingInfraVersion 3 - -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' + -AzdoToken '$(System.AccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/core-templates/job/source-index-stage1.yml b/eng/common/core-templates/job/source-index-stage1.yml index 945c1c19e824..205fb5b3a395 100644 --- a/eng/common/core-templates/job/source-index-stage1.yml +++ b/eng/common/core-templates/job/source-index-stage1.yml @@ -34,10 +34,12 @@ jobs: pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: $(DncEngPublicBuildPool) - image: windows.vs2022.amd64.open + image: 1es-windows-2022-open + os: windows ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $(DncEngInternalBuildPool) - image: windows.vs2022.amd64 + image: 1es-windows-2022 + os: windows steps: - ${{ if eq(parameters.is1ESPipeline, '') }}: diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml index 20924366b8a4..454fd75c7aff 100644 --- a/eng/common/core-templates/post-build/post-build.yml +++ b/eng/common/core-templates/post-build/post-build.yml @@ -307,9 +307,10 @@ stages: scriptType: ps scriptLocation: scriptPath scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) + arguments: > + -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} - -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' + -AzdoToken '$(System.AccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/core-templates/steps/get-federated-access-token.yml b/eng/common/core-templates/steps/get-federated-access-token.yml index c8c49cc0e8f0..3a4d4410c482 100644 --- a/eng/common/core-templates/steps/get-federated-access-token.yml +++ b/eng/common/core-templates/steps/get-federated-access-token.yml @@ -3,6 +3,14 @@ parameters: type: string - name: outputVariableName type: string +- name: is1ESPipeline + type: boolean +- name: stepName + type: string + default: 'getFederatedAccessToken' +- name: condition + type: string + default: '' # Resource to get a token for. Common values include: # - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps # - 'https://storage.azure.com/' for storage @@ -10,10 +18,16 @@ parameters: - name: resource type: string default: '499b84ac-1321-427f-aa17-267ca6975798' +- name: isStepOutputVariable + type: boolean + default: false steps: - task: AzureCLI@2 displayName: 'Getting federated access token for feeds' + name: ${{ parameters.stepName }} + ${{ if ne(parameters.condition, '') }}: + condition: ${{ parameters.condition }} inputs: azureSubscription: ${{ parameters.federatedServiceConnection }} scriptType: 'pscore' @@ -25,4 +39,4 @@ steps: exit 1 } Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" - Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken" \ No newline at end of file + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken" \ No newline at end of file diff --git a/eng/common/core-templates/steps/publish-logs.yml b/eng/common/core-templates/steps/publish-logs.yml index 8c5ea77b586d..80788c523191 100644 --- a/eng/common/core-templates/steps/publish-logs.yml +++ b/eng/common/core-templates/steps/publish-logs.yml @@ -32,7 +32,6 @@ steps: '$(MaestroAccessToken)' '$(dn-bot-all-orgs-artifact-feeds-rw)' '$(akams-client-id)' - '$(akams-client-secret)' '$(microsoft-symbol-server-pat)' '$(symweb-symbol-server-pat)' '$(dn-bot-all-orgs-build-rw-code-rw)' diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index eb1a90804648..4b5e8d7166bd 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -72,7 +72,7 @@ __AlpinePackages+=" krb5-dev" __AlpinePackages+=" openssl-dev" __AlpinePackages+=" zlib-dev" -__FreeBSDBase="13.2-RELEASE" +__FreeBSDBase="13.3-RELEASE" __FreeBSDPkg="1.17.0" __FreeBSDABI="13" __FreeBSDPackages="libunwind" @@ -605,18 +605,18 @@ elif [[ "$__CodeName" == "illumos" ]]; then fi echo "Building binutils. Please wait.." if [[ "$__hasWget" == 1 ]]; then - wget -O- https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.bz2 | tar -xjf - + wget -O- https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz | tar -xJf - else - curl -SL https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.bz2 | tar -xjf - + curl -SL https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz | tar -xJf - fi mkdir build-binutils && cd build-binutils - ../binutils-2.33.1/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.10" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir" + ../binutils-2.42/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.11" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir" make -j "$JOBS" && make install && cd .. echo "Building gcc. Please wait.." if [[ "$__hasWget" == 1 ]]; then - wget -O- https://ftp.gnu.org/gnu/gcc/gcc-8.4.0/gcc-8.4.0.tar.xz | tar -xJf - + wget -O- https://ftp.gnu.org/gnu/gcc/gcc-13.3.0/gcc-13.3.0.tar.xz | tar -xJf - else - curl -SL https://ftp.gnu.org/gnu/gcc/gcc-8.4.0/gcc-8.4.0.tar.xz | tar -xJf - + curl -SL https://ftp.gnu.org/gnu/gcc/gcc-13.3.0/gcc-13.3.0.tar.xz | tar -xJf - fi CFLAGS="-fPIC" CXXFLAGS="-fPIC" @@ -624,7 +624,7 @@ elif [[ "$__CodeName" == "illumos" ]]; then CFLAGS_FOR_TARGET="-fPIC" export CFLAGS CXXFLAGS CXXFLAGS_FOR_TARGET CFLAGS_FOR_TARGET mkdir build-gcc && cd build-gcc - ../gcc-8.4.0/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.10" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir" --with-gnu-as \ + ../gcc-13.3.0/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.11" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir" --with-gnu-as \ --with-gnu-ld --disable-nls --disable-libgomp --disable-libquadmath --disable-libssp --disable-libvtv --disable-libcilkrts --disable-libada --disable-libsanitizer \ --disable-libquadmath-support --disable-shared --enable-tls make -j "$JOBS" && make install && cd .. @@ -632,7 +632,7 @@ elif [[ "$__CodeName" == "illumos" ]]; then if [[ "$__UseMirror" == 1 ]]; then BaseUrl=https://pkgsrc.smartos.skylime.net fi - BaseUrl="$BaseUrl/packages/SmartOS/trunk/${__illumosArch}/All" + BaseUrl="$BaseUrl/packages/SmartOS/2019Q4/${__illumosArch}/All" echo "Downloading manifest" if [[ "$__hasWget" == 1 ]]; then wget "$BaseUrl" diff --git a/eng/common/native/init-compiler.sh b/eng/common/native/init-compiler.sh index 62900e12b21c..9a0e1f2b4567 100644 --- a/eng/common/native/init-compiler.sh +++ b/eng/common/native/init-compiler.sh @@ -19,11 +19,9 @@ case "$compiler" in # clangx.y or clang-x.y version="$(echo "$compiler" | tr -d '[:alpha:]-=')" majorVersion="${version%%.*}" - [ -z "${version##*.*}" ] && minorVersion="${version#*.}" - if [ -z "$minorVersion" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -le 6 ]; then - minorVersion=0; - fi + # LLVM based on v18 released in early 2024, with two releases per year + maxVersion="$((18 + ((($(date +%Y) - 2024) * 12 + $(date +%-m) - 3) / 6)))" compiler=clang ;; @@ -31,7 +29,9 @@ case "$compiler" in # gccx.y or gcc-x.y version="$(echo "$compiler" | tr -d '[:alpha:]-=')" majorVersion="${version%%.*}" - [ -z "${version##*.*}" ] && minorVersion="${version#*.}" + + # GCC based on v14 released in early 2024, with one release per year + maxVersion="$((14 + ((($(date +%Y) - 2024) * 12 + $(date +%-m) - 3) / 12)))" compiler=gcc ;; esac @@ -49,12 +49,10 @@ check_version_exists() { desired_version=-1 # Set up the environment to be used for building with the desired compiler. - if command -v "$compiler-$1.$2" > /dev/null; then - desired_version="-$1.$2" - elif command -v "$compiler$1$2" > /dev/null; then - desired_version="$1$2" - elif command -v "$compiler-$1$2" > /dev/null; then - desired_version="-$1$2" + if command -v "$compiler-$1" > /dev/null; then + desired_version="-$1" + elif command -v "$compiler$1" > /dev/null; then + desired_version="$1" fi echo "$desired_version" @@ -75,7 +73,7 @@ set_compiler_version_from_CC() { fi # gcc and clang often display 3 part versions. However, gcc can show only 1 part in some environments. - IFS=. read -r majorVersion minorVersion _ < /dev/null; then - echo "Error: No usable version of $compiler found." + echo "Error: No compatible version of $compiler was found within the range of $minVersion to $maxVersion. Please upgrade your toolchain or specify the compiler explicitly using CLR_CC and CLR_CXX environment variables." exit 1 fi CC="$(command -v "$compiler" 2> /dev/null)" CXX="$(command -v "$cxxCompiler" 2> /dev/null)" set_compiler_version_from_CC - else - if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ] && { [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; }; then - # If a major version was provided explicitly, and it was too old, find a newer compiler instead - if ! command -v "$compiler" > /dev/null; then - echo "Error: Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH." - exit 1 - fi - - CC="$(command -v "$compiler" 2> /dev/null)" - CXX="$(command -v "$cxxCompiler" 2> /dev/null)" - set_compiler_version_from_CC - fi fi else - desired_version="$(check_version_exists "$majorVersion" "$minorVersion")" + desired_version="$(check_version_exists "$majorVersion")" if [ "$desired_version" = "-1" ]; then - echo "Error: Could not find specific version of $compiler: $majorVersion $minorVersion." + echo "Error: Could not find specific version of $compiler: $majorVersion." exit 1 fi fi diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1 index 4ff587ca46a9..90b58e32a87b 100644 --- a/eng/common/post-build/publish-using-darc.ps1 +++ b/eng/common/post-build/publish-using-darc.ps1 @@ -42,6 +42,7 @@ try { --azdev-pat "$AzdoToken" ` --bar-uri "$MaestroApiEndPoint" ` --ci ` + --verbose ` @optionalParams if ($LastExitCode -ne 0) { diff --git a/global.json b/global.json index 214f7c1bd457..4023209fd0f0 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24352.2", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24405.1", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From 500f24f99e3c60ce6aa5f6025bd799fbb64d7a44 Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 7 Aug 2024 18:38:00 +0200 Subject: [PATCH 04/13] C# params interop tests (#17495) * C# params interop tests * One more test --- .../FSharp.Compiler.ComponentTests.fsproj | 2 + .../Interop/ParamArray.fs | 107 +++++++++++++++++ .../Interop/ParamArrayMigrated.fs | 110 ++++++++++++++++++ tests/FSharp.Test.Utilities/Compiler.fs | 3 + .../Source/Misc/ConsumeParamArray.fsscript | 56 --------- .../Source/Misc/E_ConsumeParamArray.fsscript | 35 ------ tests/fsharpqa/Source/Misc/ParamArray.cs | 33 ------ tests/fsharpqa/Source/Misc/env.lst | 3 - 8 files changed, 222 insertions(+), 127 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/Interop/ParamArray.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Interop/ParamArrayMigrated.fs delete mode 100644 tests/fsharpqa/Source/Misc/ConsumeParamArray.fsscript delete mode 100644 tests/fsharpqa/Source/Misc/E_ConsumeParamArray.fsscript delete mode 100644 tests/fsharpqa/Source/Misc/ParamArray.cs diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 3cbbe3ef3c5c..0509d424f8ba 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -250,6 +250,8 @@ + + diff --git a/tests/FSharp.Compiler.ComponentTests/Interop/ParamArray.fs b/tests/FSharp.Compiler.ComponentTests/Interop/ParamArray.fs new file mode 100644 index 000000000000..3864857d9699 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Interop/ParamArray.fs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Interop + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module ParamArray = + + [] + let ``C# 13 params enhancements`` () = + let csharp = + CSharp """ +using System; +using System.Collections.Generic; + +namespace CSharpAssembly; + +public class CS13ParamArray +{ + public static void WriteNames(params string[] names) + => Console.WriteLine("First: " + string.Join(" + ", names)); + + public static void WriteNames(params List names) + => Console.WriteLine("Second: " + string.Join(" + ", names)); + + public static void WriteNames(params IEnumerable names) + => Console.WriteLine("Third: " + string.Join(" + ", names)); +}""" + |> withCSharpLanguageVersionPreview + + FSharp """ +open System.Collections.Generic; +open CSharpAssembly + +CS13ParamArray.WriteNames("Petr", "Jana") +CS13ParamArray.WriteNames(List["Petr"; "Jana"]) +CS13ParamArray.WriteNames(["Petr"; "Jana"]) +""" + |> withReferences [csharp] + |> compileExeAndRun + |> shouldSucceed + |> withStdOutContainsAllInOrder [ + "First: Petr + Jana" + "Second: Petr + Jana" + "Third: Petr + Jana" + ] + + [] + let ``C# 13 params enhancements - ReadOnlySpan`` () = + let csharp = + CSharp """ +using System; + +namespace CSharpAssembly; + +public class CS13ParamArray +{ + public static void WriteNames(params ReadOnlySpan names) + => Console.WriteLine(string.Join(" + ", names)); +}""" + |> withCSharpLanguageVersionPreview + + FSharp """ +open System +open CSharpAssembly + +CS13ParamArray.WriteNames(ReadOnlySpan([|"Petr"; "Jana"|])) +""" + |> withReferences [csharp] + |> compileExeAndRun + |> shouldSucceed + |> withStdOutContainsAllInOrder [ "Petr + Jana" ] + + [] + let ``C# 13 params enhancements - error when no matching overload is available`` () = + let csharp = + CSharp """ +using System; +using System.Collections.Generic; + +namespace CSharpAssembly; + +public class CS13ParamArray +{ + public static void WriteNames(params List names) + => Console.WriteLine("Second: " + string.Join(" + ", names)); + + public static void WriteNames(params IEnumerable names) + => Console.WriteLine("Third: " + string.Join(" + ", names)); +}""" + |> withCSharpLanguageVersionPreview + + FSharp """ +open CSharpAssembly + +CS13ParamArray.WriteNames("Petr", "Jana") +""" + |> withReferences [csharp] + |> asExe + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 503, Line 4, Col 1, Line 4, Col 42, + "A member or object constructor 'WriteNames' taking 2 arguments is not accessible from this code location. All accessible versions of method 'WriteNames' take 1 arguments.") + ] \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Interop/ParamArrayMigrated.fs b/tests/FSharp.Compiler.ComponentTests/Interop/ParamArrayMigrated.fs new file mode 100644 index 000000000000..0906682d6d65 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Interop/ParamArrayMigrated.fs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Interop + +open Xunit +open FSharp.Test.Compiler + +module ParamArrayMigrated = + + let csharp = + CSharp """ +using System; + +namespace CSharpAssembly +{ + [AttributeUsage(AttributeTargets.All)] + public class AttributeWithParamArray : Attribute + { + public object[] Parameters; + + public AttributeWithParamArray(params object[] x) + { + + Parameters = x; + } + } + + public class CSParamArray + { + public static int Method(params int[] allArgs) + { + int total = 0; + foreach (int i in allArgs) + total += i; + + return total; + } + + public static int Method(params T[] args) + { + return args.Length; + } + } +}""" + + [] + let ``Valid params call`` () = + FSharp """ +open System +open CSharpAssembly + +// Apply the attribute +[ obj) |])>] +type Foo() = + [ obj); ("bar" :> obj) |])>] + override this.ToString() = "Stuff" + +let callCSGenericMethod (a: 't[]) = CSParamArray.Method(a) + +[] +do + let getTestAttribute (t : Type) = + let tyAttributes = t.GetCustomAttributes(false) + let attrib = tyAttributes |> Array.find (fun attrib -> match attrib with :? AttributeWithParamArray -> true | _ -> false) + (attrib :?> AttributeWithParamArray) + + let tyFoo = typeof + let testAtt = getTestAttribute tyFoo + if testAtt.Parameters <> [| (0 :> obj) |] then + failwith "Attribute parameters not as expected" + + let directCallWorks = + CSParamArray.Method(9, 8, 7) + CSParamArray.Method(1, 2) + CSParamArray.Method() = (9 + 8 + 7) + (1 + 2) + if not directCallWorks then + failwith "Calling C# param array method gave unexpected result" + + let callParamArray (x : int array) = CSParamArray.Method(x) + let asArrayCallWorks = (callParamArray [| 9; 8; 7 |]) = (9 + 8 + 7) + if not asArrayCallWorks then + failwith "Calling C# param array method, passing args as an array, gave unexpected result" + + if callCSGenericMethod [|"1";"2";"3"|] <> 3 then + failwith "Calling C# generic param array method gave unexpected result" + + if CSParamArray.Method("1", "2", "3") <> CSParamArray.Method([|"1"; "2"; "3"|]) then + failwith "Calling C# generic param array in normal and expanded method gave unexpected result" +""" + |> withReferences [csharp] + |> compileExeAndRun + |> shouldSucceed + + [] + let ``Invalid params call`` () = + FSharp """ +open CSharpAssembly + +[] +type Foo() = + override this.ToString() = "Stuff" +""" + |> withReferences [csharp] + |> asExe + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 13, Line 4, Col 29, Line 4, Col 37, + "The static coercion from type\n int \nto \n 'a \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed.") + (Error 267, Line 4, Col 29, Line 4, Col 37, + "This is not a valid constant expression or custom attribute value") + ] diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index 9fb050b09df2..1edd5ef54888 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -585,6 +585,9 @@ module rec Compiler = | CS cs -> CS { cs with LangVersion = ver } | _ -> failwith "Only supported in C#" + let withCSharpLanguageVersionPreview = + withCSharpLanguageVersion CSharpLanguageVersion.Preview + let withOutputType (outputType : CompileOutput) (cUnit: CompilationUnit) : CompilationUnit = match cUnit with | FS x -> FS { x with OutputType = outputType } diff --git a/tests/fsharpqa/Source/Misc/ConsumeParamArray.fsscript b/tests/fsharpqa/Source/Misc/ConsumeParamArray.fsscript deleted file mode 100644 index 188c6459f388..000000000000 --- a/tests/fsharpqa/Source/Misc/ConsumeParamArray.fsscript +++ /dev/null @@ -1,56 +0,0 @@ -// #Regression #Misc -#light - -// Test that F# can consume C# param arrays. (Can't use variable number of arguments, rather -// arguments will just be exposed as taking an array.) -// FSB 1105, params attributes not supported -// This is also regression test for FSHARP1.0:3817 -open System - -#r "ParamArray.dll" -open CSharpAssembly - -// Apply the attribute -[ obj) |])>] -type Foo() = - [ obj); ("bar" :> obj) |])>] - override this.ToString() = "Stuff" - -let callCSGenericMethod (a: 't[]) = CSParamArray.Method(a) - -[] -do - let getTestAttribute (t : Type) = - let tyAttributes = t.GetCustomAttributes(false) - let attrib = tyAttributes |> Array.find (fun attrib -> match attrib with :? AttributeWithParamArray -> true | _ -> false) - (attrib :?> AttributeWithParamArray) - - let tyFoo = typeof - let testAtt = getTestAttribute tyFoo - if testAtt.Parameters <> [| (0 :> obj) |] then - printfn "Attribute parameters not as expected" - exit 1 - - let directCallWorks = - CSParamArray.Method(9, 8, 7) + CSParamArray.Method(1, 2) + CSParamArray.Method() = (9 + 8 + 7) + (1 + 2) - if not directCallWorks then - printfn "Calling C# param array method gave unexpected result" - exit 1 - - let callParamArray (x : int array) = CSParamArray.Method(x) - let asArrayCallWorks = (callParamArray [| 9; 8; 7 |]) = (9 + 8 + 7) - if not asArrayCallWorks then - printfn "Calling C# param array method, passing args as an array, gave unexpected result" - exit 1 - - if callCSGenericMethod [|"1";"2";"3"|] <> 3 then - printfn "Calling C# generic param array method gave unexpected result" - exit 1 - - if CSParamArray.Method("1", "2", "3") <> CSParamArray.Method([|"1"; "2"; "3"|]) then - printfn "Calling C# generic param array in normal and expanded method gave unexpected result" - exit 1 - - exit 0 - - \ No newline at end of file diff --git a/tests/fsharpqa/Source/Misc/E_ConsumeParamArray.fsscript b/tests/fsharpqa/Source/Misc/E_ConsumeParamArray.fsscript deleted file mode 100644 index 8e6a7a1473dc..000000000000 --- a/tests/fsharpqa/Source/Misc/E_ConsumeParamArray.fsscript +++ /dev/null @@ -1,35 +0,0 @@ -// #Regression #Misc -#light - -// This test used to be the regression test for FSHARP1.0:1105. -// This code is expected to fail compilation, yet it was able to detect FSHARP1.0:3817 -// so I am promoting it to negative testcases. -//The static coercion from type -open System - -#r "ParamArray.dll" -open CSharpAssembly - -// Apply the attribute -[] -type Foo() = - [] - override this.ToString() = "Stuff" - -[] -do - let testPassed = - let getTestAttribute (t : Type) = - let tyAttributes = t.GetCustomAttributes(false) - let attrib = tyAttributes |> Array.find (fun attrib -> match attrib with :? AttributeWithParamArray -> true | _ -> false) - (attrib :?> AttributeWithParamArray) - - let tyFoo = typeof - let testAtt = getTestAttribute tyFoo - if testAtt.Parameters <> [|upcast 0|] then - false - else - true - - if not testPassed then exit 1 - exit 0 diff --git a/tests/fsharpqa/Source/Misc/ParamArray.cs b/tests/fsharpqa/Source/Misc/ParamArray.cs deleted file mode 100644 index 6c7ae6108d75..000000000000 --- a/tests/fsharpqa/Source/Misc/ParamArray.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; - -namespace CSharpAssembly -{ - [AttributeUsage(AttributeTargets.All)] - public class AttributeWithParamArray : Attribute - { - public object[] Parameters; - - public AttributeWithParamArray(params object[] x) - { - - Parameters = x; - } - } - - public class CSParamArray - { - public static int Method(params int[] allArgs) - { - int total = 0; - foreach (int i in allArgs) - total += i; - - return total; - } - - public static int Method(params T[] args) - { - return args.Length; - } - } -} \ No newline at end of file diff --git a/tests/fsharpqa/Source/Misc/env.lst b/tests/fsharpqa/Source/Misc/env.lst index b2b236cb7f58..ada01d097f16 100644 --- a/tests/fsharpqa/Source/Misc/env.lst +++ b/tests/fsharpqa/Source/Misc/env.lst @@ -1,6 +1,3 @@ - PRECMD="\$CSC_PIPE /target:library ParamArray.cs" SOURCE=ConsumeParamArray.fsscript # ConsumeParamArray.fsscript - PRECMD="\$CSC_PIPE /target:library ParamArray.cs" SOURCE=E_ConsumeParamArray.fsscript # E_ConsumeParamArray.fsscript - SOURCE=E_productioncoverage01.fs # E_productioncoverage01.fs SOURCE=E_productioncoverage02.fs # E_productioncoverage02.fs SOURCE=E_productioncoverage03.fs SCFLAGS="--test:ErrorRanges" # E_productioncoverage03.fs From 60f667fa6867267829ec1c358b975e97ba17a1f3 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 20:35:32 +0200 Subject: [PATCH 05/13] [main] Update dependencies from dotnet/source-build-reference-packages (#17435) --- eng/SourceBuildPrebuiltBaseline.xml | 1 + eng/Version.Details.xml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/SourceBuildPrebuiltBaseline.xml b/eng/SourceBuildPrebuiltBaseline.xml index ced31dc1641c..4416e9693afc 100644 --- a/eng/SourceBuildPrebuiltBaseline.xml +++ b/eng/SourceBuildPrebuiltBaseline.xml @@ -17,6 +17,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5820fde4b23e..c25919fc85ba 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,9 +1,9 @@ - + https://github.com/dotnet/source-build-reference-packages - cc732c57199f725857c201da146525e3be6bc504 + 0d066e61a30c2599d0ced871ea45acf0e10571af From 15b5a6ce4bf34c03ef172e1e01eedd7e039cc5c4 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Wed, 7 Aug 2024 11:41:48 -0700 Subject: [PATCH 06/13] Update DefaultAugmentationAttribute (#17502) * Update DefaultAugmentationAttribute * readme --- docs/release-notes/.FSharp.Core/9.0.100.md | 2 +- src/FSharp.Core/prim-types.fs | 4 ++-- src/FSharp.Core/prim-types.fsi | 2 +- .../Conformance/Types/UnionTypes/UnionStructTypes.fs | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/release-notes/.FSharp.Core/9.0.100.md b/docs/release-notes/.FSharp.Core/9.0.100.md index 9438303a7ed8..50d799c4c9eb 100644 --- a/docs/release-notes/.FSharp.Core/9.0.100.md +++ b/docs/release-notes/.FSharp.Core/9.0.100.md @@ -8,6 +8,6 @@ ### Changed * Change compiler default setting realsig+ when building assemblies ([Issue #17384](https://github.com/dotnet/fsharp/issues/17384), [PR #17378](https://github.com/dotnet/fsharp/pull/17385)) * Change compiler default setting for compressedMetadata ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383)) - +* Struct UnionCase doesn't seem to be a valid target for the DefaultAugmentationAttribute ([Issue #17499](https://github.com/dotnet/fsharp/issues/17499), [PR #17502](https://github.com/dotnet/fsharp/pull/17502)) ### Breaking Changes diff --git a/src/FSharp.Core/prim-types.fs b/src/FSharp.Core/prim-types.fs index 211496b99d1c..b5bcc6c28bac 100644 --- a/src/FSharp.Core/prim-types.fs +++ b/src/FSharp.Core/prim-types.fs @@ -90,7 +90,7 @@ namespace Microsoft.FSharp.Core type VolatileFieldAttribute() = inherit Attribute() - [] + [] [] type DefaultAugmentationAttribute(value:bool) = inherit Attribute() @@ -106,7 +106,7 @@ namespace Microsoft.FSharp.Core type CLIMutableAttribute() = inherit Attribute() - [] + [] [] type AutoSerializableAttribute(value:bool) = inherit Attribute() diff --git a/src/FSharp.Core/prim-types.fsi b/src/FSharp.Core/prim-types.fsi index 8b35a81e8863..79b73df66e7c 100644 --- a/src/FSharp.Core/prim-types.fsi +++ b/src/FSharp.Core/prim-types.fsi @@ -324,7 +324,7 @@ namespace Microsoft.FSharp.Core /// and accessor members for the generated CLI class for that type. /// /// Attributes - [] + [] [] type DefaultAugmentationAttribute = inherit Attribute diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionStructTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionStructTypes.fs index 574f1695d627..a202d3b03cbd 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionStructTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionStructTypes.fs @@ -778,6 +778,7 @@ type Foo = let foo = [Baz 42; Bat; Batman] printf "%A" foo""" + |> withLangVersionPreview |> asExe |> compile |> shouldSucceed From b4471a1de495b90e303230a2934b478a7c6c0ccd Mon Sep 17 00:00:00 2001 From: Florian Verdonck Date: Thu, 8 Aug 2024 15:24:38 +0200 Subject: [PATCH 07/13] Pass SynPat.Typed nodes to original continuation. (#17510) * Pass SynPat.Typed nodes to original continuation. * Add release note * Trigger CI --- .../.FSharp.Compiler.Service/9.0.100.md | 1 + .../GraphChecking/FileContentMapping.fs | 2 +- .../TypeChecks/Graph/Scenarios.fs | 20 +++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md index 99c251d76c2b..b681c4750430 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md @@ -5,6 +5,7 @@ * Optimize simple mappings in comprehensions when the body of the mapping has `let`-bindings and/or sequential expressions before a single yield. ([PR #17419](https://github.com/dotnet/fsharp/pull/17419)) * C# protected property can be assigned in F# inherit constructor call. ([Issue #13299](https://github.com/dotnet/fsharp/issues/13299), [PR #17391](https://github.com/dotnet/fsharp/pull/17391)) * MethodAccessException on equality comparison of a record with private fields. ([Issue #17447](https://github.com/dotnet/fsharp/issues/17447), [PR #17391](https://github.com/dotnet/fsharp/pull/17467)) +* Compiler fails to recognise namespace in FQN with enabled GraphBasedChecking. ([Issue #17508](https://github.com/dotnet/fsharp/issues/17508), [PR #17510](https://github.com/dotnet/fsharp/pull/17510)) ### Added diff --git a/src/Compiler/Driver/GraphChecking/FileContentMapping.fs b/src/Compiler/Driver/GraphChecking/FileContentMapping.fs index 271e927933a7..13ee0c312f9b 100644 --- a/src/Compiler/Driver/GraphChecking/FileContentMapping.fs +++ b/src/Compiler/Driver/GraphChecking/FileContentMapping.fs @@ -598,7 +598,7 @@ let visitPat (p: SynPat) : FileContentEntry list = match p with | NameofPat moduleNameIdent -> continuation [ visitNameofResult moduleNameIdent ] | SynPat.Paren(pat = pat) -> visit pat continuation - | SynPat.Typed(pat = pat; targetType = t) -> visit pat (fun nodes -> nodes @ visitSynType t) + | SynPat.Typed(pat = pat; targetType = t) -> visit pat (fun nodes -> nodes @ visitSynType t |> continuation) | SynPat.Const _ -> continuation [] | SynPat.Wild _ -> continuation [] | SynPat.Named _ -> continuation [] diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/Scenarios.fs b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/Scenarios.fs index 6bd170a9dbf9..fe0c270edc51 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/Scenarios.fs +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/Scenarios.fs @@ -1022,4 +1022,24 @@ module Program = """ (set [| 0 |]) ] + scenario + "fully qualified type in tuple constructor pattern" + [ + sourceFile + "A.fs" + """ +namespace MyRootNamespace.A + +type Foo() = class end +""" + Set.empty + sourceFile + "B.fs" + """ +namespace MyRootNamespace.A.B + +type Bar(foo: MyRootNamespace.A.Foo, s: string) = class end +""" + (set [| 0 |]) + ] ] \ No newline at end of file From 4fc209c3bc424231f6dd3cc9f181c3af367c411e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 17:20:01 +0200 Subject: [PATCH 08/13] Update dependencies from https://github.com/dotnet/arcade build 20240808.1 (#17511) Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24405.1 -> To Version 9.0.0-beta.24408.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- global.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c25919fc85ba..c13be2a77d81 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,14 +42,14 @@ - + https://github.com/dotnet/arcade - 2c829550b968e29389ce8392244da2b006d71301 + 610e251fc34686333b98188320ca1eecd7e6af6c - + https://github.com/dotnet/arcade - 2c829550b968e29389ce8392244da2b006d71301 + 610e251fc34686333b98188320ca1eecd7e6af6c diff --git a/global.json b/global.json index 4023209fd0f0..7e6174612e2c 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24405.1", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24408.1", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From 9125cb5887f6f4e513b4cb06058015b5215698ce Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 09:24:41 -0700 Subject: [PATCH 09/13] Update dependencies from https://github.com/dotnet/arcade build 20240808.2 (#17515) Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.24408.1 -> To Version 9.0.0-beta.24408.2 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/common/darc-init.ps1 | 2 +- eng/common/darc-init.sh | 2 +- global.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c13be2a77d81..29a4b0f6b6ed 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,14 +42,14 @@ - + https://github.com/dotnet/arcade - 610e251fc34686333b98188320ca1eecd7e6af6c + 60ae233c3d77f11c5fdb53e570b64d503b13ba59 - + https://github.com/dotnet/arcade - 610e251fc34686333b98188320ca1eecd7e6af6c + 60ae233c3d77f11c5fdb53e570b64d503b13ba59 diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1 index 8fda30bdce2b..e33743105635 100644 --- a/eng/common/darc-init.ps1 +++ b/eng/common/darc-init.ps1 @@ -1,6 +1,6 @@ param ( $darcVersion = $null, - $versionEndpoint = 'https://maestro.dot.net/api/assets/darc-version?api-version=2019-01-16', + $versionEndpoint = 'https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20', $verbosity = 'minimal', $toolpath = $null ) diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh index c305ae6bd771..36dbd45e1ce8 100755 --- a/eng/common/darc-init.sh +++ b/eng/common/darc-init.sh @@ -2,7 +2,7 @@ source="${BASH_SOURCE[0]}" darcVersion='' -versionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2019-01-16' +versionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20' verbosity='minimal' while [[ $# > 0 ]]; do diff --git a/global.json b/global.json index 7e6174612e2c..17b7d9a82e69 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24408.1", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24408.2", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From 4324c4f4ef17e2257b0f1702deb2b7cd1bd732d0 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Fri, 9 Aug 2024 09:39:08 -0700 Subject: [PATCH 10/13] Enable F# 9.0 (#17500) * initial * Update DefaultAugmentationAttribute * readme * readme * further * temp * Update src/Compiler/Facilities/LanguageFeatures.fs Co-authored-by: Brian Rourke Boll * more * fantomas * revert EnforceAttributeTargets * revert * moar --------- Co-authored-by: Vlad Zarytovskii Co-authored-by: Brian Rourke Boll --- .../.FSharp.Compiler.Service/9.0.100.md | 2 +- docs/release-notes/.FSharp.Core/9.0.100.md | 2 + docs/release-notes/.Language/9.0.md | 2 + docs/release-notes/.VisualStudio/17.12.md | 1 + src/Compiler/Facilities/LanguageFeatures.fs | 40 +- src/FSharp.Core/array.fsi | 26 - src/FSharp.Core/prim-types.fsi | 16 - .../AttributeUsage/AttributeUsage.fs | 127 ++--- .../AttributeUsage/E_AttributeTargets01.fs | 6 +- .../CustomAttributes/Basic/Basic.fs | 8 +- .../MethodsAndProperties.fs | 10 +- .../Conformance/Constraints/Unmanaged.fs | 1 - .../Types/StructTypes/StructActivePatterns.fs | 2 +- .../Types/UnionTypes/UnionStructTypes.fs | 12 - .../Types/UnionTypes/UnionTypes.fs | 3 +- .../CCtorDUWithMember/CCtorDUWithMember.fs | 2 - ...onExpr07.fs.RealInternalSignatureOn.il.bsl | 69 ++- .../ComputedCollections.fs | 1 - .../EmittedIL/ForLoop/ForLoop.fs | 32 -- .../GeneratedIterators/GeneratedIterators.fs | 1 - .../GenericComparison/GenericComparison.fs | 6 - .../ListExpressionStepping.fs | 1 - ...pping02.fs.RealInternalSignatureOff.il.bsl | 246 +++++---- ...mings01.fs.RealInternalSignatureOff.il.bsl | 490 +++++++++--------- ...rLoop01.fs.RealInternalSignatureOff.il.bsl | 102 ++-- .../EmittedIL/Misc/Misc.fs | 2 - .../EmittedIL/Nullness/NullnessMetadata.fs | 2 - .../ClassTypeInitialization.fs | 14 - .../ClassTypeVisibility.fs | 14 - .../ClassTypeVisibilityModuleRoot.fs | 15 - .../ClassTypeVisibilityModuleRootWithFsi.fs | 13 - .../ClassTypeVisibilityNamespaceRoot.fs | 14 - ...ClassTypeVisibilityNamespaceRootWithFsi.fs | 16 - .../ModuleInitialization.fs | 9 - .../RealInternalSignature.fs | 19 - .../SeqExpressionStepping.fs | 2 - .../EmittedIL/StringFormatAndInterpolation.fs | 3 - .../EmittedIL/TupleElimination.fs | 5 +- .../ActivePatternArgCountMismatchTest.fs | 98 ---- .../ErrorMessages/Directives.fs | 66 +-- .../ErrorMessages/SuggestionsTests.fs | 4 +- .../FSharpChecker/CommonWorkflows.fs | 2 +- ...rnTypeDirectedPartialActivePatternTests.fs | 7 +- .../Language/CopyAndUpdateTests.fs | 2 - .../Language/DiscriminatedUnionTests.fs | 10 - .../Language/InterpolatedStringsTests.fs | 3 - .../Nullness/NullableCsharpImportTests.fs | 1 - .../NullableLibraryConstructsTests.fs | 1 - .../Nullness/NullableReferenceTypesTests.fs | 1 - .../Miscellaneous/FsharpSuiteMigrated.fs | 1 + .../TypeChecks/Graph/GraphProcessingTests.fs | 2 +- .../TypeChecks/PropertyShadowingTests.fs | 3 - .../TypeExtensions/PropertyShadowingTests.fs | 2 - .../FSharpScriptTests.fs | 16 +- .../AssemblyContentProviderTests.fs | 1 + ...p.Core.SurfaceArea.netstandard20.debug.bsl | 43 ++ ...p.Core.SurfaceArea.netstandard21.debug.bsl | 45 ++ tests/FSharp.Test.Utilities/Compiler.fs | 3 + tests/FSharp.Test.Utilities/ScriptHelpers.fs | 2 + .../EmittedIL/ComputedListExpressions.fs | 104 ++-- .../CodeGen/EmittedIL/StaticLinkTests.fs | 2 +- .../CodeGen/EmittedIL/TaskGeneratedCode.fs | 24 +- .../DataExpressions/ComputationExpressions.fs | 6 +- .../Compiler/Language/StringInterpolation.fs | 2 +- .../Language/StructActivePatternTests.fs | 4 +- .../LanguagePrimitives/CastToUnitsTests.fs | 2 +- .../effects.HasEffect.output.test.bsl | 3 + ...tailcalls.NoNeedToTailcall.output.test.bsl | 3 + .../optimize/stats/ILLink.LinkAttributes.xml | 6 + .../optimize/stats/ILLink.Substitutions.xml | 5 + tests/fsharp/tests.fs | 18 +- ...n_return_type_and_known_type_arguments.bsl | 2 +- tests/fsharp/typecheck/sigs/neg06_a.bsl | 4 + tests/fsharp/typecheck/sigs/neg103.bsl | 26 +- tests/fsharp/typecheck/sigs/neg103.vsbsl | 22 +- tests/fsharp/typecheck/sigs/neg104.vsbsl | 2 - tests/fsharp/typecheck/sigs/neg82.vsbsl | 27 - tests/fsharp/typecheck/sigs/neg83.bsl | 3 - tests/fsharp/typecheck/sigs/neg83.vsbsl | 16 - .../langversion/langversionhelp.437.1033.bsl | 3 +- tests/service/FsUnit.fs | 3 +- 81 files changed, 899 insertions(+), 1037 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md index b681c4750430..f05d847075dc 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md @@ -22,5 +22,5 @@ * Optimize metadata reading for type members and custom attributes. ([PR #17364](https://github.com/dotnet/fsharp/pull/17364)) * Enforce `AttributeTargets` on unions. ([PR #17389](https://github.com/dotnet/fsharp/pull/17389)) * Ensure that isinteractive multi-emit backing fields are not public. ([Issue #17439](https://github.com/dotnet/fsharp/issues/17438)), ([PR #17439](https://github.com/dotnet/fsharp/pull/17439)) - +* Enable FSharp 9.0 Language Version ([Issue #17497](https://github.com/dotnet/fsharp/issues/17438)), [PR](https://github.com/dotnet/fsharp/pull/17500))) ### Breaking Changes diff --git a/docs/release-notes/.FSharp.Core/9.0.100.md b/docs/release-notes/.FSharp.Core/9.0.100.md index 50d799c4c9eb..503a6c17d850 100644 --- a/docs/release-notes/.FSharp.Core/9.0.100.md +++ b/docs/release-notes/.FSharp.Core/9.0.100.md @@ -1,4 +1,5 @@ ### Fixed +* Struct UnionCase doesn't seem to be a valid target for the DefaultAugmentationAttribute ([Issue #17499](https://github.com/dotnet/fsharp/issues/17499), [PR #17502](https://github.com/dotnet/fsharp/pull/17502)) ### Added @@ -8,6 +9,7 @@ ### Changed * Change compiler default setting realsig+ when building assemblies ([Issue #17384](https://github.com/dotnet/fsharp/issues/17384), [PR #17378](https://github.com/dotnet/fsharp/pull/17385)) * Change compiler default setting for compressedMetadata ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383)) +* Enable FSharp 9.0 Language Version ([Issue #17497](https://github.com/dotnet/fsharp/issues/17438)), [PR](https://github.com/dotnet/fsharp/pull/17500))) * Struct UnionCase doesn't seem to be a valid target for the DefaultAugmentationAttribute ([Issue #17499](https://github.com/dotnet/fsharp/issues/17499), [PR #17502](https://github.com/dotnet/fsharp/pull/17502)) ### Breaking Changes diff --git a/docs/release-notes/.Language/9.0.md b/docs/release-notes/.Language/9.0.md index 538587cee4e9..2f0001ef73b8 100644 --- a/docs/release-notes/.Language/9.0.md +++ b/docs/release-notes/.Language/9.0.md @@ -3,3 +3,5 @@ ### Added +### Changed +* Enable FSharp 9.0 Language Version ([Issue #17497](https://github.com/dotnet/fsharp/issues/17438)), [PR](https://github.com/dotnet/fsharp/pull/17500))) diff --git a/docs/release-notes/.VisualStudio/17.12.md b/docs/release-notes/.VisualStudio/17.12.md index 6df973cf6077..2fb0e2d6977b 100644 --- a/docs/release-notes/.VisualStudio/17.12.md +++ b/docs/release-notes/.VisualStudio/17.12.md @@ -7,3 +7,4 @@ ### Changed ### Breaking Changes +* Enable FSharp 9.0 Language Version ([Issue #17497](https://github.com/dotnet/fsharp/issues/17438)), [PR](https://github.com/dotnet/fsharp/pull/17500))) diff --git a/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs index bfaed3292229..2fd2e150bcc6 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fs +++ b/src/Compiler/Facilities/LanguageFeatures.fs @@ -103,10 +103,11 @@ type LanguageVersion(versionText) = static let languageVersion60 = 6.0m static let languageVersion70 = 7.0m static let languageVersion80 = 8.0m + static let languageVersion90 = 9.0m static let previewVersion = 9999m // Language version when preview specified - static let defaultVersion = languageVersion80 // Language version when default specified + static let defaultVersion = languageVersion90 // Language version when default specified static let latestVersion = defaultVersion // Language version when latest specified - static let latestMajorVersion = languageVersion80 // Language version when latestmajor specified + static let latestMajorVersion = languageVersion90 // Language version when latestmajor specified static let validOptions = [| "preview"; "default"; "latest"; "latestmajor" |] @@ -119,6 +120,7 @@ type LanguageVersion(versionText) = languageVersion60 languageVersion70 languageVersion80 + languageVersion90 |] static let features = @@ -195,22 +197,24 @@ type LanguageVersion(versionText) = LanguageFeature.ExtendedFixedBindings, languageVersion80 LanguageFeature.PreferStringGetPinnableReference, languageVersion80 + // F# 9.0 + LanguageFeature.NullnessChecking, languageVersion90 + LanguageFeature.ReuseSameFieldsInStructUnions, languageVersion90 + LanguageFeature.PreferExtensionMethodOverPlainProperty, languageVersion90 + LanguageFeature.WarningIndexedPropertiesGetSetSameType, languageVersion90 + LanguageFeature.WarningWhenTailCallAttrOnNonRec, languageVersion90 + LanguageFeature.UnionIsPropertiesVisible, languageVersion90 + LanguageFeature.BooleanReturningAndReturnTypeDirectedPartialActivePattern, languageVersion90 + LanguageFeature.LowerInterpolatedStringToConcat, languageVersion90 + LanguageFeature.LowerIntegralRangesToFastLoops, languageVersion90 + LanguageFeature.LowerSimpleMappingsInComprehensionsToFastLoops, languageVersion90 + LanguageFeature.ParsedHashDirectiveArgumentNonQuotes, languageVersion90 + LanguageFeature.EmptyBodiedComputationExpressions, languageVersion90 + // F# preview - LanguageFeature.NullnessChecking, previewVersion - LanguageFeature.FromEndSlicing, previewVersion - LanguageFeature.UnmanagedConstraintCsharpInterop, previewVersion - LanguageFeature.ReuseSameFieldsInStructUnions, previewVersion - LanguageFeature.PreferExtensionMethodOverPlainProperty, previewVersion - LanguageFeature.WarningIndexedPropertiesGetSetSameType, previewVersion - LanguageFeature.WarningWhenTailCallAttrOnNonRec, previewVersion - LanguageFeature.UnionIsPropertiesVisible, previewVersion - LanguageFeature.BooleanReturningAndReturnTypeDirectedPartialActivePattern, previewVersion - LanguageFeature.EnforceAttributeTargets, previewVersion - LanguageFeature.LowerInterpolatedStringToConcat, previewVersion - LanguageFeature.LowerIntegralRangesToFastLoops, previewVersion - LanguageFeature.LowerSimpleMappingsInComprehensionsToFastLoops, previewVersion - LanguageFeature.ParsedHashDirectiveArgumentNonQuotes, previewVersion - LanguageFeature.EmptyBodiedComputationExpressions, previewVersion + LanguageFeature.UnmanagedConstraintCsharpInterop, previewVersion // not enabled because: https://github.com/dotnet/fsharp/issues/17509 + LanguageFeature.EnforceAttributeTargets, previewVersion // not enabled because: https://github.com/dotnet/fsharp/issues/17514 + LanguageFeature.FromEndSlicing, previewVersion // Unfinished features --- needs work ] static let defaultLanguageVersion = LanguageVersion("default") @@ -232,6 +236,8 @@ type LanguageVersion(versionText) = | "7" -> languageVersion70 | "8.0" | "8" -> languageVersion80 + | "9.0" + | "9" -> languageVersion90 | _ -> 0m let specified = getVersionFromString versionText diff --git a/src/FSharp.Core/array.fsi b/src/FSharp.Core/array.fsi index 8947a2a8d075..dd808fd636cb 100644 --- a/src/FSharp.Core/array.fsi +++ b/src/FSharp.Core/array.fsi @@ -3443,7 +3443,6 @@ module Array = /// /// [] - [] val forall: predicate: ('T -> bool) -> array: 'T array -> bool /// Tests if any element of the array satisfies the given predicate. @@ -3477,7 +3476,6 @@ module Array = /// Evaluates to false /// [] - [] val exists: predicate: ('T -> bool) -> array: 'T array -> bool /// Returns the first element for which the given function returns True. @@ -3508,7 +3506,6 @@ module Array = /// Evaluates to None /// [] - [] val tryFind: predicate: ('T -> bool) -> array: 'T array -> 'T option /// Returns the index of the first element in the array @@ -3539,7 +3536,6 @@ module Array = /// Evaluates to None /// [] - [] val tryFindIndex: predicate: ('T -> bool) -> array: 'T array -> int option /// Applies the given function to successive elements, returning the first @@ -3572,7 +3568,6 @@ module Array = /// /// [] - [] val tryPick: chooser: ('T -> 'U option) -> array: 'T array -> 'U option /// Applies a function to each element of the array in parallel, threading an accumulator argument @@ -3600,7 +3595,6 @@ module Array = /// [] - [] val inline reduce: reduction: ('T -> 'T -> 'T) -> array: 'T array -> 'T /// Applies a projection function to each element of the array in parallel, reducing elements in each thread with a dedicated 'reduction' function. @@ -3628,7 +3622,6 @@ module Array = /// [] - [] val reduceBy: projection: ('T -> 'U) -> reduction: ('U -> 'U -> 'U) -> array: 'T array -> 'U /// Returns the greatest of all elements of the array, compared via Operators.max. @@ -3660,7 +3653,6 @@ module Array = /// Throws System.ArgumentException. /// [] - [] val inline max: array: 'T array -> 'T when 'T: comparison /// Returns the greatest of all elements of the array, compared via Operators.max on the function result. @@ -3693,7 +3685,6 @@ module Array = /// Throws System.ArgumentException. /// [] - [] val inline maxBy: projection: ('T -> 'U) -> array: 'T array -> 'T when 'U: comparison /// Returns the smallest of all elements of the array, compared via Operators.min. @@ -3725,7 +3716,6 @@ module Array = /// Throws System.ArgumentException. /// [] - [] val inline min: array: 'T array -> 'T when 'T: comparison /// Returns the lowest of all elements of the array, compared via Operators.min on the function result. @@ -3758,7 +3748,6 @@ module Array = /// Throws System.ArgumentException. /// [] - [] val inline minBy: projection: ('T -> 'U) -> array: 'T array -> 'T when 'U: comparison /// Returns the sum of the elements in the array. @@ -3778,7 +3767,6 @@ module Array = /// Evaluates to 11. /// [] - [] val inline sum: array: ^T array -> ^T when ^T: (static member (+): ^T * ^T -> ^T) and ^T: (static member Zero: ^T) @@ -3800,7 +3788,6 @@ module Array = /// Evaluates to 7. /// [] - [] val inline sumBy: projection: ('T -> ^U) -> array: 'T array -> ^U when ^U: (static member (+): ^U * ^U -> ^U) and ^U: (static member Zero: ^U) @@ -3828,7 +3815,6 @@ module Array = /// Throws ArgumentException /// [] - [] val inline average: array: ^T array -> ^T when ^T: (static member (+): ^T * ^T -> ^T) and ^T: (static member DivideByInt: ^T * int -> ^T) @@ -3866,7 +3852,6 @@ module Array = /// Throws ArgumentException /// [] - [] val inline averageBy: projection: ('T -> ^U) -> array: 'T array -> ^U when ^U: (static member (+): ^U * ^U -> ^U) and ^U: (static member DivideByInt: ^U * int -> ^U) @@ -4012,7 +3997,6 @@ module Array = /// [] - [] val groupBy: projection: ('T -> 'Key) -> array: 'T array -> ('Key * 'T array) array when 'Key: equality /// Apply the given function to each element of the array. @@ -4132,7 +4116,6 @@ module Array = /// Evaluates to [| 1; 1 3; 4; 6; 8 |]. /// [] - [] val sort: array: 'T array -> 'T array when 'T: comparison /// Sorts the elements of an array in parallel, using the given projection for the keys and returning a new array. @@ -4158,7 +4141,6 @@ module Array = /// [] - [] val sortBy: projection: ('T -> 'Key) -> array: 'T array -> 'T array when 'Key: comparison /// Sorts the elements of an array in parallel, using the given comparison function as the order, returning a new array. @@ -4187,7 +4169,6 @@ module Array = /// Evaluates to [|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]. /// [] - [] val sortWith: comparer: ('T -> 'T -> int) -> array: 'T array -> 'T array /// Sorts the elements of an array by mutating the array in-place in parallel, using the given projection for the keys. @@ -4210,7 +4191,6 @@ module Array = /// After evaluation array contains [|"a"; "dd"; "bbb"; "cccc"|]. /// [] - [] val sortInPlaceBy: projection: ('T -> 'Key) -> array: 'T array -> unit when 'Key: comparison /// Sorts the elements of an array by mutating the array in-place in parallel, using the given comparison function as the order. @@ -4234,7 +4214,6 @@ module Array = /// After evaluation array contains [|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]. /// [] - [] val sortInPlaceWith: comparer: ('T -> 'T -> int) -> array: 'T array -> unit /// Sorts the elements of an array by mutating the array in-place in parallel, using the given comparison function. @@ -4253,7 +4232,6 @@ module Array = /// After evaluation array contains [| 1; 1; 3; 4; 6; 8 |]. /// [] - [] val sortInPlace: array: 'T array -> unit when 'T: comparison /// Sorts the elements of an array in parallel, in descending order, returning a new array. Elements are compared using . @@ -4274,7 +4252,6 @@ module Array = /// Evaluates to [| 8; 6; 4; 3; 1; 1 |]. /// [] - [] val sortDescending: array: 'T array -> 'T array when 'T: comparison /// Sorts the elements of an array in parallel, in descending order, using the given projection for the keys and returning a new array. @@ -4297,7 +4274,6 @@ module Array = /// Evaluates to [|"cccc"; "bbb"; "dd"; "a"|]. /// [] - [] val sortByDescending: projection: ('T -> 'Key) -> array: 'T array -> 'T array when 'Key: comparison /// Combines the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is @@ -4321,7 +4297,6 @@ module Array = /// Evaluates to [| (1, "one"); (2, "two") |]. /// [] - [] val zip: array1: 'T1 array -> array2: 'T2 array -> ('T1 * 'T2) array /// Returns a new collection containing only the elements of the collection @@ -4343,5 +4318,4 @@ module Array = /// Evaluates to [| 2; 4 |] /// [] - [] val filter: predicate: ('T -> bool) -> array: 'T array -> 'T array diff --git a/src/FSharp.Core/prim-types.fsi b/src/FSharp.Core/prim-types.fsi index 79b73df66e7c..623ed3b0ec70 100644 --- a/src/FSharp.Core/prim-types.fsi +++ b/src/FSharp.Core/prim-types.fsi @@ -3208,7 +3208,6 @@ namespace Microsoft.FSharp.Core /// A nullable value representing the argument. /// The argument value. If it is null, the defaultValue is returned. [] - [] val inline defaultIfNull : defaultValue:'T -> arg:'T | null -> 'T when 'T : not null and 'T : not struct /// Used to specify a default value for an nullable value argument in the implementation of a function @@ -3216,7 +3215,6 @@ namespace Microsoft.FSharp.Core /// A nullable value representing the argument. /// The argument value. If it is null, the defaultValue is returned. [] - [] val inline defaultIfNullV : defaultValue:'T -> arg:Nullable<'T> -> 'T #endif @@ -3522,7 +3520,6 @@ namespace Microsoft.FSharp.Core /// The value to check. /// A choice indicating whether the value is null or not-null. [] - [] [] val inline (|Null|NonNull|) : value: 'T | null -> Choice when 'T : not null and 'T : not struct @@ -3531,14 +3528,12 @@ namespace Microsoft.FSharp.Core /// The value to check. /// A choice indicating whether the value is null or not-null. [] - [] val inline (|NullV|NonNullV|) : value: Nullable<'T> -> Choice /// When used in a pattern checks the given value is not null. /// The value to check. /// The non-null value. [] - [] [] val inline (|NonNullQuick|) : value: 'T | null -> 'T when 'T : not null and 'T : not struct @@ -3547,7 +3542,6 @@ namespace Microsoft.FSharp.Core /// The value to check. /// The non-null value. [] - [] val inline (|NonNullQuickV|) : value: Nullable<'T> -> 'T /// Determines whether the given value is null. @@ -3555,14 +3549,12 @@ namespace Microsoft.FSharp.Core /// The value to check. /// True when value is null, false otherwise. [] - [] val inline isNullV : value:Nullable<'T> -> bool #else /// Determines whether the given value is null. /// The value to check. /// A choice indicating whether the value is null or not-null. [] - [] val inline (|Null|NonNull|) : value: 'T -> Choice when 'T : null and 'T : not struct #endif @@ -3579,14 +3571,12 @@ namespace Microsoft.FSharp.Core /// In a future revision of nullness support this may be unified with 'null'. /// The null value for a value type. [] - [] val inline nullV<'T when 'T : struct and 'T : (new : unit -> 'T) and 'T :> ValueType> : Nullable<'T> /// Asserts that the value is non-null. /// The value to check. /// The value when it is not null. If the value is null an exception is raised. [] - [] [] val inline nonNull : value: 'T | null -> 'T when 'T : not null and 'T : not struct @@ -3595,14 +3585,12 @@ namespace Microsoft.FSharp.Core /// The value to check. /// True when value is null, false otherwise. [] - [] val inline nonNullV : value:Nullable<'T> -> 'T /// Asserts that the value is non-null. /// The value to check. /// True when value is null, false otherwise. [] - [] val inline withNull : value:'T -> 'T | null when 'T : not null and 'T : not struct /// Asserts that the value is non-null. @@ -3610,7 +3598,6 @@ namespace Microsoft.FSharp.Core /// The value to check. /// True when value is null, false otherwise. [] - [] val inline withNullV : value:'T -> Nullable<'T> #endif @@ -3685,7 +3672,6 @@ namespace Microsoft.FSharp.Core /// /// The result value. [] - [] val inline nullArgCheck : argumentName:string -> 'T | null -> 'T when 'T : not null and 'T : not struct #endif @@ -5822,7 +5808,6 @@ namespace Microsoft.FSharp.Core /// The possibly nullable value. /// The same value as in the input. [] - [] #if !BUILDING_WITH_LKG && !NO_NULLCHECKING_LIB_SUPPORT val inline nonNull : value: 'T | null -> 'T when 'T : not null and 'T : not struct #else @@ -5833,7 +5818,6 @@ namespace Microsoft.FSharp.Core /// The value to retype from ('T | null) to 'T . /// The non-null value. [] - [] #if !BUILDING_WITH_LKG && !NO_NULLCHECKING_LIB_SUPPORT val inline (|NonNullQuick|) : value: 'T | null -> 'T when 'T : not null and 'T : not struct #else diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs index 0cdde04516af..faf1784612b8 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs @@ -59,31 +59,31 @@ module CustomAttributes_AttributeUsage = // SOURCE=AttributeTargetsIsMethod01.fs # AttributeTargetsIsMethod01.fs [] - let ``AttributeTargetsIsMethod01_fs`` compilation = + let ``AttributeTargetsIsMethod01_fs 8.0`` compilation = compilation + |> withLangVersion80 |> verifyCompileAndRun |> shouldSucceed // SOURCE=AttributeTargetsIsMethod01.fs # AttributeTargetsIsMethod01.fs [] - let ``AttributeTargetsIsMethod01_fs preview`` compilation = + let ``AttributeTargetsIsMethod01_fs`` compilation = compilation - |> withLangVersionPreview |> verifyCompileAndRun |> shouldSucceed // SOURCE=AttributeTargetsIsProperty.fs # AttributeTargetsIsProperty.fs [] - let ``AttributeTargetsIsProperty_fs`` compilation = + let ``AttributeTargetsIsProperty_fs 8.0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetsIsProperty.fs # AttributeTargetsIsProperty.fs [] - let ``AttributeTargetsIsProperty_fs preview`` compilation = + let ``AttributeTargetsIsProperty_fs`` compilation = compilation - |> withLangVersionPreview |> verifyCompile |> shouldSucceed @@ -98,12 +98,14 @@ module CustomAttributes_AttributeUsage = [] let ``E_AttributeTargets01_fs`` compilation = compilation + |> withLangVersionPreview |> verifyCompile |> shouldFail |> withDiagnostics [ (Error 842, Line 21, Col 21, Line 21, Col 22, "This attribute is not valid for use on this language element") (Error 842, Line 24, Col 21, Line 24, Col 29, "This attribute is not valid for use on this language element") (Error 842, Line 27, Col 7, Line 27, Col 16, "This attribute is not valid for use on this language element") + (Error 842, Line 18, Col 7, Line 18, Col 8, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargets02.fs # E_AttributeTargets02.fs @@ -120,7 +122,7 @@ module CustomAttributes_AttributeUsage = // SOURCE=E_AttributeTargetIsField01.fs # E_AttributeTargetIsField01.fs [] - let ``E_AttributeTargetIsField01_fs`` compilation = + let ``E_AttributeTargetIsField01_fs 8_0`` compilation = compilation |> withLangVersion80 |> withOptions ["--nowarn:25"] @@ -129,10 +131,10 @@ module CustomAttributes_AttributeUsage = // SOURCE=E_AttributeTargetIsField01.fs # E_AttributeTargetIsField01.fs [] - let ``E_AttributeTargetIsField01_fs preview`` compilation = + let ``E_AttributeTargetIsField01_fs`` compilation = compilation - |> withLangVersionPreview |> withOptions ["--nowarn:25"] + |> withLangVersionPreview |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -157,7 +159,7 @@ module CustomAttributes_AttributeUsage = // SOURCE=E_AttributeTargetIsField02.fs # E_AttributeTargetIsField02.fs [] - let ``E_AttributeTargetIsField02_fs`` compilation = + let ``E_AttributeTargetIsField02_fs 8.0`` compilation = compilation |> withLangVersion80 |> withOptions ["--nowarn:25"] @@ -166,16 +168,15 @@ module CustomAttributes_AttributeUsage = // SOURCE=E_AttributeTargetIsField02.fs # E_AttributeTargetIsField02.fs [] - let ``E_AttributeTargetIsField02_fs preview`` compilation = + let ``E_AttributeTargetIsField02_fs`` compilation = compilation - |> withLangVersionPreview |> withOptions ["--nowarn:25"] |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsMethod02.fs # E_AttributeTargetIsMethod02.fs [] - let ``E_AttributeTargetIsMethod02_fs`` compilation = + let ``E_AttributeTargetIsMethod02_fs 8_0`` compilation = compilation |> withLangVersion80 |> withOptions ["--nowarn:25"] @@ -184,7 +185,7 @@ module CustomAttributes_AttributeUsage = // SOURCE=E_AttributeTargetIsMethod02.fs # E_AttributeTargetIsMethod02.fs [] - let ``E_AttributeTargetIsMethod02_fs preview`` compilation = + let ``E_AttributeTargetIsMethod02_fs`` compilation = compilation |> withLangVersionPreview |> withOptions ["--nowarn:25"] @@ -206,7 +207,7 @@ module CustomAttributes_AttributeUsage = // SOURCE=E_AttributeTargetIsMethod03.fs # E_AttributeTargetIsMethod03.fs [] - let ``E_AttributeTargetIsMethod03_fs`` compilation = + let ``E_AttributeTargetIsMethod03_fs 8_0`` compilation = compilation |> withLangVersion80 |> withOptions ["--nowarn:25"] @@ -215,7 +216,7 @@ module CustomAttributes_AttributeUsage = // SOURCE=E_AttributeTargetIsMethod03.fs # E_AttributeTargetIsMethod03.fs [] - let ``E_AttributeTargetIsMethod03_fs preview`` compilation = + let ``E_AttributeTargetIsMethod03_fs`` compilation = compilation |> withLangVersionPreview |> withOptions ["--nowarn:25"] @@ -295,44 +296,45 @@ module CustomAttributes_AttributeUsage = // SOURCE=AttributeTargetIsStruct.fs # AttributeTargetIsStruct.fs [] - let ``AttributeTargetIsStruct_fs`` compilation = + let ``AttributeTargetIsStruct_fs 8.0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetIsStruct.fs # AttributeTargetIsStruct.fs [] - let ``AttributeTargetIsStruct_fs preview`` compilation = + let ``AttributeTargetIsStruct_fs`` compilation = compilation - |> withLangVersionPreview |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetIsClass.fs # AttributeTargetIsClass.fs [] - let ``AttributeTargetIsClass_fs`` compilation = + let ``AttributeTargetIsClass_fs 8.0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetIsClass.fs # AttributeTargetIsClass.fs [] - let ``AttributeTargetIsClass_fs preview`` compilation = + let ``AttributeTargetIsClass_fs`` compilation = compilation - |> withLangVersionPreview |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsStruct.fs # E_AttributeTargetIsStruct.fs [] - let ``E_AttributeTargetIsStruct_fs`` compilation = + let ``E_AttributeTargetIsStruct_fs 8.0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsStruct.fs # E_AttributeTargetIsStruct.fs [] - let ``E_AttributeTargetIsStruct_fs preview`` compilation = + let ``E_AttributeTargetIsStruct_fs`` compilation = compilation |> withLangVersionPreview |> verifyCompile @@ -354,21 +356,15 @@ module CustomAttributes_AttributeUsage = // SOURCE=E_AttributeTargetIsClass.fs # E_AttributeTargetIsClass.fs [] - let ``E_AttributeTargetIsClass_fs`` compilation = - compilation - |> verifyCompile - |> shouldSucceed - - // SOURCE=E_AttributeTargetIsClass01.fs # E_AttributeTargetIsClass01.fs - [] - let ``E_AttributeTargetIsClass01_fs`` compilation = + let ``E_AttributeTargetIsClass_fs 8_0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsClass.fs # E_AttributeTargetIsClass.fs [] - let ``E_AttributeTargetIsClass_fs preview`` compilation = + let ``E_AttributeTargetIsClass_fs`` compilation = compilation |> withLangVersionPreview |> verifyCompile @@ -381,7 +377,15 @@ module CustomAttributes_AttributeUsage = // SOURCE=E_AttributeTargetIsClass01.fs # E_AttributeTargetIsClass01.fs [] - let ``E_AttributeTargetIsClass01_fs preview`` compilation = + let ``E_AttributeTargetIsClass01_fs 8_0`` compilation = + compilation + |> withLangVersion80 + |> verifyCompile + |> shouldSucceed + + // SOURCE=E_AttributeTargetIsClass01.fs # E_AttributeTargetIsClass01.fs + [] + let ``E_AttributeTargetIsClass01_fs`` compilation = compilation |> withLangVersionPreview |> verifyCompile @@ -468,8 +472,9 @@ module CustomAttributes_AttributeUsage = // SOURCE=E_AttributeTargetIsField03.fs # E_AttributeTargetIsField03.fs [] - let ``E_AttributeTargetIsField03_fs`` compilation = + let ``E_AttributeTargetIsField03_fs 8_0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -478,7 +483,7 @@ module CustomAttributes_AttributeUsage = // SOURCE=E_AttributeTargetIsField03.fs # E_AttributeTargetIsField03.fs [] - let ``E_AttributeTargetIsField03_fs preview`` compilation = + let ``E_AttributeTargetIsField03_fs`` compilation = compilation |> withLangVersionPreview |> verifyCompile @@ -490,14 +495,15 @@ module CustomAttributes_AttributeUsage = // SOURCE=E_AttributeTargetIsProperty01.fs # E_AttributeTargetIsField03.fs [] - let ``E_AttributeTargetIsProperty01_fs`` compilation = + let ``E_AttributeTargetIsProperty01_fs 8_0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsProperty01.fs # E_AttributeTargetIsField03.fs [] - let ``E_AttributeTargetIsProperty01_fs preview`` compilation = + let ``E_AttributeTargetIsProperty01_fs`` compilation = compilation |> withLangVersionPreview |> verifyCompile @@ -509,14 +515,15 @@ module CustomAttributes_AttributeUsage = // SOURCE=E_AttributeTargetIsCtor01.fs # E_AttributeTargetIsCtor01.fs [] - let ``E_AttributeTargetIsCtor01_fs`` compilation = + let ``E_AttributeTargetIsCtor01_fs 8_0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsCtor01.fs # E_AttributeTargetIsCtor01.fs [] - let ``E_AttributeTargetIsCtor01_fs preview`` compilation = + let ``E_AttributeTargetIsCtor01_fs`` compilation = compilation |> withLangVersionPreview |> verifyCompile @@ -530,29 +537,30 @@ module CustomAttributes_AttributeUsage = // SOURCE=AttributeTargetsIsEnum01.fs # AttributeTargetsIsEnum01.fs [] - let ``AttributeTargetsIsEnum01_fs`` compilation = + let ``AttributeTargetsIsEnum01_fs 8.0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetsIsEnum01.fs # AttributeTargetsIsEnum01.fs [] - let ``AttributeTargetsIsEnum01_fs preview`` compilation = + let ``AttributeTargetsIsEnum01_fs`` compilation = compilation - |> withLangVersionPreview |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsEnum01.fs # E_AttributeTargetIsEnum01.fs [] - let ``E_AttributeTargetIsEnum01_fs`` compilation = + let ``E_AttributeTargetIsEnum01_fs 8_0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsEnum01.fs # E_AttributeTargetIsEnum01.fs [] - let ``E_AttributeTargetIsEnum01_fs preview`` compilation = + let ``E_AttributeTargetIsEnum01_fs`` compilation = compilation |> withLangVersionPreview |> verifyCompile @@ -566,29 +574,30 @@ module CustomAttributes_AttributeUsage = // SOURCE=AttributeTargetsIsDelegate01.fs # AttributeTargetsIsDelegate01.fs [] - let ``AttributeTargetsIsDelegate01_fs`` compilation = + let ``AttributeTargetsIsDelegate01_fs 8.0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetsIsDelegate01.fs # AttributeTargetsIsDelegate01.fs [] - let ``AttributeTargetsIsDelegate01_fs preview`` compilation = + let ``AttributeTargetsIsDelegate01_fs`` compilation = compilation - |> withLangVersionPreview |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsDelegate01.fs # E_AttributeTargetIsDelegate01.fs [] - let ``E_AttributeTargetIsDelegate01_fs`` compilation = + let ``E_AttributeTargetIsDelegate01_fs 8.0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsDelegate01.fs # E_AttributeTargetIsDelegate01.fs [] - let ``E_AttributeTargetsIsDelegate01_fs preview`` compilation = + let ``E_AttributeTargetsIsDelegate01_fs`` compilation = compilation |> withLangVersionPreview |> verifyCompile @@ -608,35 +617,36 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = [] let mutable valueFactory = valueFactory """ - |> withLangVersionPreview |> compile |> shouldSucceed // SOURCE=AttributeTargetsIsInterface.fs # AttributeTargetsIsInterface.fs [] - let ``AttributeTargetsIsInterface_fs`` compilation = + let ``AttributeTargetsIsInterface_fs 8.0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetsIsInterface.fs # AttributeTargetsIsInterface.fs [] - let ``AttributeTargetsIsInterface_fs preview`` compilation = + let ``AttributeTargetsIsInterface_fs`` compilation = compilation - |> withLangVersionPreview + |> withLangVersion90 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsInterface.fs # E_AttributeTargetIsInterface.fs [] - let ``E_AttributeTargetIsInterface_fs`` compilation = + let ``E_AttributeTargetIsInterface_fs 8_0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsInterface.fs # E_AttributeTargetIsInterface.fs [] - let ``E_AttributeTargetIsInterface_fs preview`` compilation = + let ``E_AttributeTargetIsInterface_fs`` compilation = compilation |> withLangVersionPreview |> verifyCompile @@ -650,14 +660,15 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = // SOURCE= E_AttributeTargetIsClass02.fs # E_AttributeTargetIsClass02.fs [] - let ``E_AttributeTargetIsClass02_fs`` compilation = + let ``E_AttributeTargetIsClass02_fs 8.0`` compilation = compilation + |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsClass02.fs # E_AttributeTargetIsClass02.fs [] - let ``E_AttributeTargetIsClass02_fs preview`` compilation = + let ``E_AttributeTargetIsClass02_fs`` compilation = compilation |> withLangVersionPreview |> verifyCompile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/E_AttributeTargets01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/E_AttributeTargets01.fs index 15bfe1a8e1da..84ad2986d678 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/E_AttributeTargets01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/E_AttributeTargets01.fs @@ -20,13 +20,15 @@ type A() = [] val mutable m_Index : int - + [] val mutable m_Name : string - + [] member this.Index with [] get () = 5 and [] set (x : int) = () [] static member (+) (op1 : A, op2 : A) = new A() + + member this.DoIt() = someVal diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs index f90c9b30e3ef..52dde397f297 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs @@ -156,9 +156,11 @@ module CustomAttributes_Basic = [] let ``E_StructLayoutSequentialNeg_DU2_fs`` compilation = compilation + |> withLangVersionPreview |> verifyCompile |> shouldFail - |> withDiagnostics [ + |> withDiagnostics[ + (Error 842, Line 8, Col 7, Line 8, Col 104, "This attribute is not valid for use on this language element") (Error 937, Line 9, Col 10, Line 9, Col 12, "Only structs and classes without primary constructors may be given the 'StructLayout' attribute") ] @@ -166,9 +168,11 @@ module CustomAttributes_Basic = [] let ``E_StructLayoutSequentialNeg_Delegate_fs`` compilation = compilation + |> withLangVersionPreview |> verifyCompile |> shouldFail |> withDiagnostics [ + (Error 842, Line 8, Col 7, Line 8, Col 104, "This attribute is not valid for use on this language element") (Error 937, Line 9, Col 10, Line 9, Col 12, "Only structs and classes without primary constructors may be given the 'StructLayout' attribute") ] @@ -176,9 +180,11 @@ module CustomAttributes_Basic = [] let ``E_StructLayoutSequentialNeg_Interface_fs`` compilation = compilation + |> withLangVersionPreview |> verifyCompile |> shouldFail |> withDiagnostics [ + (Error 842, Line 7, Col 7, Line 7, Col 104, "This attribute is not valid for use on this language element") (Error 937, Line 8, Col 10, Line 8, Col 12, "Only structs and classes without primary constructors may be given the 'StructLayout' attribute") ] diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MethodsAndProperties/MethodsAndProperties.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MethodsAndProperties/MethodsAndProperties.fs index 9722633165dd..484b653b359e 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MethodsAndProperties/MethodsAndProperties.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MethodsAndProperties/MethodsAndProperties.fs @@ -11,7 +11,7 @@ module MemberDefinitions_MethodsAndProperties = let verifyCompile compilation = compilation |> asExe - |> withOptions ["--nowarn:988"] + |> withOptions ["--nowarn:988"; "--nowarn:FS3581"] |> compile let verifyCompileAndRun = verifyCompile >> run @@ -20,7 +20,6 @@ module MemberDefinitions_MethodsAndProperties = [] let ``Partially Overriden Property`` compilation = compilation - |> withLangVersionPreview |> withCheckNulls |> typecheck |> shouldSucceed @@ -29,7 +28,6 @@ module MemberDefinitions_MethodsAndProperties = [] let ``AbstractProperties01_fs`` compilation = compilation - |> withLangVersionPreview |> withCheckNulls |> verifyCompileAndRun |> shouldSucceed @@ -596,7 +594,6 @@ type MyIndexerClass() = with get (index: int): string = "" and set (index: int) (value: float) = () """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 3581, Line 3, Col 14, Line 3, Col 22, "An indexed property's getter and setter must have the same type. Property 'Indexer1' has getter of type 'string' but setter of type 'float'.") @@ -609,7 +606,6 @@ type MyIndexerClass() = with get (index) = 1 and set (index) (value: float) = () """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 3581, Line 3, Col 14, Line 3, Col 22, "An indexed property's getter and setter must have the same type. Property 'Indexer2' has getter of type 'int' but setter of type 'float'.") @@ -623,7 +619,6 @@ type MyIndexerClass() = member x.Indexer3 with set index (value: float) = () """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 3581, Line 3, Col 14, Line 3, Col 22, "An indexed property's getter and setter must have the same type. Property 'Indexer3' has getter of type 'int' but setter of type 'float'.") @@ -636,7 +631,6 @@ type MyIndexerClass() = with get (index: int, index2: int): float = 0.0 and set (index1: int, index2: int) (value: string) = () """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 3581, Line 3, Col 14, Line 3, Col 22, "An indexed property's getter and setter must have the same type. Property 'Indexer4' has getter of type 'float' but setter of type 'string'.") @@ -649,7 +643,6 @@ type MyIndexerClass() = with get (index, index2) = 0.0 and set (index1, index2) value = () """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 3581, Line 3, Col 14, Line 3, Col 22, "An indexed property's getter and setter must have the same type. Property 'Indexer5' has getter of type 'float' but setter of type 'obj'.") @@ -671,7 +664,6 @@ type GenericIndexer<'indexerArgs,'indexerOutput,'indexerInput>() = m_lastArgs <- args m_lastInput <- input """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 3581, Line 9, Col 17, Line 9, Col 21, "An indexed property's getter and setter must have the same type. Property 'Item' has getter of type ''indexerOutput' but setter of type ''indexerInput'.") \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs index 085027df3202..5b9af3c8f20a 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs @@ -495,7 +495,6 @@ type FsharpStructWrapper<'TInner when 'TInner: unmanaged> = val Item : 'TInner with static member Hi() = typeof<'TInner>.Name""" |> asLibrary - |> withLangVersionPreview |> withName "fsLib" let app = diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/StructTypes/StructActivePatterns.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/StructTypes/StructActivePatterns.fs index 1b121b27766e..156d3007dddd 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/StructTypes/StructActivePatterns.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/StructTypes/StructActivePatterns.fs @@ -50,7 +50,7 @@ let rec (|IsOne|_|) someNumber = |> withOptions ["--warnaserror+"] |> typecheck |> shouldFail - |> withSingleDiagnostic (Error 3350, Line 2, Col 9, Line 2, Col 31, "Feature 'Boolean-returning and return-type-directed partial active patterns' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") + |> withSingleDiagnostic (Error 3350, Line 2, Col 9, Line 2, Col 31, "Feature 'Boolean-returning and return-type-directed partial active patterns' is not available in F# 8.0. Please use language version 9.0 or greater.") [] let ``Rec struct active pattern is possible`` () = diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionStructTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionStructTypes.fs index a202d3b03cbd..e480a4845242 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionStructTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionStructTypes.fs @@ -68,7 +68,6 @@ let main _args = printf "BasicThreeLongs=%i;GenericOfInt=%i;GenericOfString=%i;MixWithBool=%i;MixWithString=%i;Erasure=%i" structUnionSize genericSizeForInt genericSizeForString sizeForMixingWithBool sizeForMixingWithString sizeForSharingAfterErasure 0 """ - |> withLangVersionPreview |> asExe |> compile |> shouldSucceed @@ -215,7 +214,6 @@ type StructUnion = | B of string | C of string """ - |> withLangVersionPreview |> typecheck |> shouldSucceed @@ -288,7 +286,6 @@ type StructUnion = | A of Item: int | B of Item: string """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withDiagnostics [ @@ -305,7 +302,6 @@ type StructUnion = | A of Item: int | B of item : string """ - |> withLangVersionPreview |> typecheck |> shouldSucceed @@ -352,7 +348,6 @@ type StructUnion = | A of Item: int * item: string | B of string """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withDiagnostics [ @@ -368,7 +363,6 @@ type StructUnion = | A of Item: int * item: string | B of item: string """ - |> withLangVersionPreview |> typecheck |> shouldSucceed @@ -527,7 +521,6 @@ namespace Foo [] type StructUnion = A of int | B of string """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withDiagnostics [ @@ -556,7 +549,6 @@ type StructUnion = | B of string | C of string """ - |> withLangVersionPreview |> typecheck |> shouldSucceed @@ -571,7 +563,6 @@ type StructUnion = | B of string | C of string """ - |> withLangVersionPreview |> typecheck |> shouldSucceed @@ -585,7 +576,6 @@ type StructUnion = | B of string | C of string """ - |> withLangVersionPreview |> typecheck |> shouldSucceed @@ -599,7 +589,6 @@ type StructUnion = | B of string | C of string """ - |> withLangVersionPreview |> typecheck |> shouldSucceed @@ -652,7 +641,6 @@ type StructUnion = | B of string * b: string | C of c: string * string * c3: int """ - |> withLangVersionPreview |> typecheck |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs index fb11a41005d6..4611fef33eab 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs @@ -135,6 +135,7 @@ module UnionTypes = |> verifyCompile |> shouldFail |> withDiagnostics [ + (Error 434, Line 7, Col 12, Line 7, Col 13, "The property 'IsC' has the same name as a method in type 'T'.") (Error 23, Line 9, Col 19, Line 9, Col 22, "The member 'IsC' can not be defined because the name 'IsC' clashes with the default augmentation of the union case 'C' in this type or module") (Error 23, Line 13, Col 24, Line 13, Col 27, "The member 'IsC' can not be defined because the name 'IsC' clashes with the default augmentation of the union case 'C' in this type or module") ] @@ -656,7 +657,6 @@ module {kwrec} FileName (fsFromString myLibraryFsi) |> FS |> withAdditionalSourceFiles [myLibraryFs; myFileFs] |> asLibrary - |> withLangVersionPreview |> withName "MyLibrary" Fs """ @@ -667,7 +667,6 @@ printfn "%b %A %b" x y z """ |> asExe |> withReferences [myLibrary] - |> withLangVersionPreview |> compileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs index 248532a1638e..028ba3000199 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs @@ -105,7 +105,6 @@ type ILArrayShape = | One """)) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -132,7 +131,6 @@ type ILArrayShape = | One """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr07.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr07.fs.RealInternalSignatureOn.il.bsl index a86d561c98bc..35ed4a6c9460 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr07.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpr07.fs.RealInternalSignatureOn.il.bsl @@ -166,7 +166,10 @@ { .maxstack 9 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0) + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, + uint64 V_2, + int32 V_3) IL_0000: ldc.i4.1 IL_0001: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) IL_0006: stloc.0 @@ -175,32 +178,52 @@ IL_000d: ldarg.0 IL_000e: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res7@9::builder@ IL_0013: ldc.i4.0 - IL_0014: ldc.i4.1 - IL_0015: ldc.i4.3 - IL_0016: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_001b: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_0020: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_0025: ldarg.0 - IL_0026: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res7@9::builder@ - IL_002b: ldloc.0 - IL_002c: newobj instance void Program/'res7@10-1'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder, + IL_0014: conv.i8 + IL_0015: stloc.2 + IL_0016: ldc.i4.0 + IL_0017: stloc.3 + IL_0018: ldloc.2 + IL_0019: ldc.i4.4 + IL_001a: conv.i8 + IL_001b: bge.un.s IL_0032 + + IL_001d: ldloca.s V_1 + IL_001f: ldloc.3 + IL_0020: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0025: nop + IL_0026: ldloc.3 + IL_0027: ldc.i4.1 + IL_0028: add + IL_0029: stloc.3 + IL_002a: ldloc.2 + IL_002b: ldc.i4.1 + IL_002c: conv.i8 + IL_002d: add + IL_002e: stloc.2 + IL_002f: nop + IL_0030: br.s IL_0018 + + IL_0032: ldloca.s V_1 + IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0039: ldarg.0 + IL_003a: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res7@9::builder@ + IL_003f: ldloc.0 + IL_0040: newobj instance void Program/'res7@10-1'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0031: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::For(class [runtime]System.Collections.Generic.IEnumerable`1, + IL_0045: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::For(class [runtime]System.Collections.Generic.IEnumerable`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0036: ldarg.0 - IL_0037: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res7@9::builder@ - IL_003c: ldarg.0 - IL_003d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res7@9::builder@ - IL_0042: ldloc.0 - IL_0043: newobj instance void Program/'res7@12-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder, + IL_004a: ldarg.0 + IL_004b: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res7@9::builder@ + IL_0050: ldarg.0 + IL_0051: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder Program/res7@9::builder@ + IL_0056: ldloc.0 + IL_0057: newobj instance void Program/'res7@12-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0048: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_004d: tail. - IL_004f: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Combine(class [ComputationExprLibrary]Library.Eventually`1, + IL_005c: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0061: tail. + IL_0063: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Combine(class [ComputationExprLibrary]Library.Eventually`1, class [ComputationExprLibrary]Library.Eventually`1) - IL_0054: ret + IL_0068: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs index 7aa8f64ebcb5..6b4788a51033 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs @@ -8,7 +8,6 @@ module ComputedCollections = let verifyCompilation compilation = compilation |> asExe - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withOptimize |> withEmbeddedPdb |> withEmbedAllSource diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs index 9a732ba4a305..2f890a852227 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs @@ -202,7 +202,6 @@ module ForLoop = [] let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -210,7 +209,6 @@ module ForLoop = [] let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -218,7 +216,6 @@ module ForLoop = [] let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOff_nonopt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -226,7 +223,6 @@ module ForLoop = [] let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOn_nonopt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -234,7 +230,6 @@ module ForLoop = [] let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -242,7 +237,6 @@ module ForLoop = [] let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -250,7 +244,6 @@ module ForLoop = [] let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOff_nonopt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -258,7 +251,6 @@ module ForLoop = [] let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOn_nonopt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -294,7 +286,6 @@ module ForLoop = [] let ``ForEachRangeStepSByte_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -302,7 +293,6 @@ module ForLoop = [] let ``ForEachRangeStepSByte_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -310,7 +300,6 @@ module ForLoop = [] let ``ForEachRangeStepByte_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -318,7 +307,6 @@ module ForLoop = [] let ``ForEachRangeStepByte_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -326,7 +314,6 @@ module ForLoop = [] let ``ForEachRangeStepChar_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -334,7 +321,6 @@ module ForLoop = [] let ``ForEachRangeStepChar_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -342,7 +328,6 @@ module ForLoop = [] let ``ForEachRangeStepInt16_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -350,7 +335,6 @@ module ForLoop = [] let ``ForEachRangeStepInt16_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -358,7 +342,6 @@ module ForLoop = [] let ``ForEachRangeStepUInt16_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -366,7 +349,6 @@ module ForLoop = [] let ``ForEachRangeStepUInt16_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -374,7 +356,6 @@ module ForLoop = [] let ``ForEachRangeStepInt32_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -382,7 +363,6 @@ module ForLoop = [] let ``ForEachRangeStepInt32_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -390,7 +370,6 @@ module ForLoop = [] let ``ForEachRangeStepUInt32_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -398,7 +377,6 @@ module ForLoop = [] let ``ForEachRangeStepUInt32_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -406,7 +384,6 @@ module ForLoop = [] let ``ForEachRangeStepInt64_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -414,7 +391,6 @@ module ForLoop = [] let ``ForEachRangeStepInt64_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -422,7 +398,6 @@ module ForLoop = [] let ``ForEachRangeStepUInt64_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -430,7 +405,6 @@ module ForLoop = [] let ``ForEachRangeStepUInt64_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -438,7 +412,6 @@ module ForLoop = [] let ``ForEachRangeStepIntPtr_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -446,7 +419,6 @@ module ForLoop = [] let ``ForEachRangeStepIntPtr_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -454,7 +426,6 @@ module ForLoop = [] let ``ForEachRangeStepUIntPtr_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -462,7 +433,6 @@ module ForLoop = [] let ``ForEachRangeStepUIntPtr_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation @@ -470,7 +440,6 @@ module ForLoop = [] let ``ForEachRangeStep_UnitsOfMeasure_fs_RealInternalSignatureOff_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOff |> verifyCompilation @@ -478,6 +447,5 @@ module ForLoop = [] let ``ForEachRangeStep_UnitsOfMeasure_fs_RealInternalSignatureOn_opt`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withRealInternalSignatureOn |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GeneratedIterators.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GeneratedIterators.fs index 4d19bbec2f6d..68899c67afed 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GeneratedIterators.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GeneratedIterators.fs @@ -10,7 +10,6 @@ module GeneratedIterators = compilation |> withOptions [ "--test:EmitFeeFeeAs100001" ] |> asExe - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> withNoOptimize |> withEmbeddedPdb |> withEmbedAllSource diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/GenericComparison.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/GenericComparison.fs index 091817ee76da..2fc23ad345b1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/GenericComparison.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/GenericComparison.fs @@ -62,14 +62,12 @@ module GenericComparison = [] let ``Compare08_fsx`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> verifyCompilation // SOURCE=Compare09.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare09.dll" # Compare09.fs [] let ``Compare09_fsx`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> verifyCompilation // SOURCE=Compare10.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare10.dll" # Compare10.fs - @@ -143,14 +141,12 @@ module GenericComparison = [] let ``Hash10_fsx`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> verifyCompilation // SOURCE=Hash11.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash11.dll" # Hash11.fs [] let ``Hash11_fsx`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> verifyCompilation // SOURCE=Hash12.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash12.dll" # Hash12.fs - @@ -200,14 +196,12 @@ module GenericComparison = [] let ``Equals07_fsx`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> verifyCompilation // SOURCE=Equals08.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals08.dll" # Equals08.fs - [] let ``Equals08_fsx`` compilation = compilation - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> verifyCompilation // SOURCE=Equals09.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals09.dll" # Equals09.fs - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping.fs index 78c95d80d00c..abdc6368d116 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping.fs @@ -35,7 +35,6 @@ module ListExpressionStepping = let ``ListExpressionStepping02_RealInternalSignatureOn_fs`` compilation = compilation |> withRealInternalSignatureOn - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> verifyCompilation // SOURCE=ListExpressionSteppingTest2.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest2.exe" # ListExpressionSteppingTest2.fs - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping02.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping02.fs.RealInternalSignatureOff.il.bsl index 73b97924a425..ae059f40846d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping02.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping02.fs.RealInternalSignatureOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -79,7 +69,7 @@ IL_0010: ldc.i4.1 IL_0011: add IL_0012: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_0017: ret } @@ -126,7 +116,7 @@ IL_0010: ldc.i4.1 IL_0011: add IL_0012: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_0017: ret } @@ -178,8 +168,8 @@ IL_0018: add IL_0019: ldloc.2 IL_001a: newobj instance void class [runtime]System.Tuple`3::.ctor(!0, - !1, - !2) + !1, + !2) IL_001f: ret } @@ -231,8 +221,8 @@ IL_0018: add IL_0019: ldloc.2 IL_001a: newobj instance void class [runtime]System.Tuple`3::.ctor(!0, - !1, - !2) + !1, + !2) IL_001f: ret } @@ -281,14 +271,23 @@ .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_3, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_4, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_5, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_6, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_7, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_8, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_9, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_10) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_3, + uint64 V_4, + int32 V_5, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_6, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_7, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_8, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_9, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_10, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_11, + uint64 V_12, + int32 V_13, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_14, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_15, + uint64 V_16, + int32 V_17, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_18, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_19) IL_0000: ldarg.0 IL_0001: ldarg.0 IL_0002: ldarg.0 @@ -301,80 +300,137 @@ class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0017: stloc.1 IL_0018: ldc.i4.0 - IL_0019: ldc.i4.1 - IL_001a: ldc.i4.2 - IL_001b: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_0020: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_0025: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_002a: stloc.2 - IL_002b: ldloc.1 - IL_002c: ldloc.2 - IL_002d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Zip(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0032: stloc.3 - IL_0033: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::@_instance - IL_0038: ldloc.3 - IL_0039: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [runtime]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_003e: stloc.s V_4 - IL_0040: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::@_instance - IL_0045: ldloc.s V_4 - IL_0047: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [runtime]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_004c: stloc.0 - IL_004d: ldarg.0 - IL_004e: ldarg.0 - IL_004f: ldarg.0 - IL_0050: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0055: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0019: conv.i8 + IL_001a: stloc.s V_4 + IL_001c: ldc.i4.0 + IL_001d: stloc.s V_5 + IL_001f: br.s IL_0038 + + IL_0021: ldloca.s V_3 + IL_0023: ldloc.s V_5 + IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002a: nop + IL_002b: ldloc.s V_5 + IL_002d: ldc.i4.1 + IL_002e: add + IL_002f: stloc.s V_5 + IL_0031: ldloc.s V_4 + IL_0033: ldc.i4.1 + IL_0034: conv.i8 + IL_0035: add + IL_0036: stloc.s V_4 + IL_0038: ldloc.s V_4 + IL_003a: ldc.i4.3 + IL_003b: conv.i8 + IL_003c: blt.un.s IL_0021 + + IL_003e: ldloca.s V_3 + IL_0040: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0045: stloc.2 + IL_0046: ldloc.1 + IL_0047: ldloc.2 + IL_0048: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Zip(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_004d: stloc.s V_6 + IL_004f: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::@_instance + IL_0054: ldloc.s V_6 + IL_0056: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [runtime]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_005b: stloc.s V_7 + IL_005d: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::@_instance + IL_0062: ldloc.s V_7 + IL_0064: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [runtime]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0069: stloc.0 + IL_006a: ldarg.0 + IL_006b: ldarg.0 + IL_006c: ldarg.0 + IL_006d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0072: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_005a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0077: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_005f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_007c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0064: stloc.s V_6 - IL_0066: ldc.i4.0 - IL_0067: ldc.i4.1 - IL_0068: ldc.i4.2 - IL_0069: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_006e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_0078: stloc.s V_7 - IL_007a: ldc.i4.0 - IL_007b: ldc.i4.1 - IL_007c: ldc.i4.2 - IL_007d: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_0082: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_0087: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_008c: stloc.s V_8 - IL_008e: ldloc.s V_6 - IL_0090: ldloc.s V_7 - IL_0092: ldloc.s V_8 - IL_0094: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Zip3(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0099: stloc.s V_9 - IL_009b: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::@_instance - IL_00a0: ldloc.s V_9 - IL_00a2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [runtime]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00a7: stloc.s V_10 - IL_00a9: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::@_instance - IL_00ae: ldloc.s V_10 - IL_00b0: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [runtime]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00b5: stloc.s V_5 - IL_00b7: ldloc.0 - IL_00b8: ldloc.s V_5 - IL_00ba: newobj instance void class [runtime]System.Tuple`2>,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::.ctor(!0, - !1) - IL_00bf: ret + IL_0081: stloc.s V_9 + IL_0083: ldc.i4.0 + IL_0084: conv.i8 + IL_0085: stloc.s V_12 + IL_0087: ldc.i4.0 + IL_0088: stloc.s V_13 + IL_008a: br.s IL_00a3 + + IL_008c: ldloca.s V_11 + IL_008e: ldloc.s V_13 + IL_0090: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0095: nop + IL_0096: ldloc.s V_13 + IL_0098: ldc.i4.1 + IL_0099: add + IL_009a: stloc.s V_13 + IL_009c: ldloc.s V_12 + IL_009e: ldc.i4.1 + IL_009f: conv.i8 + IL_00a0: add + IL_00a1: stloc.s V_12 + IL_00a3: ldloc.s V_12 + IL_00a5: ldc.i4.3 + IL_00a6: conv.i8 + IL_00a7: blt.un.s IL_008c + + IL_00a9: ldloca.s V_11 + IL_00ab: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_00b0: stloc.s V_10 + IL_00b2: ldc.i4.0 + IL_00b3: conv.i8 + IL_00b4: stloc.s V_16 + IL_00b6: ldc.i4.0 + IL_00b7: stloc.s V_17 + IL_00b9: br.s IL_00d2 + + IL_00bb: ldloca.s V_15 + IL_00bd: ldloc.s V_17 + IL_00bf: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_00c4: nop + IL_00c5: ldloc.s V_17 + IL_00c7: ldc.i4.1 + IL_00c8: add + IL_00c9: stloc.s V_17 + IL_00cb: ldloc.s V_16 + IL_00cd: ldc.i4.1 + IL_00ce: conv.i8 + IL_00cf: add + IL_00d0: stloc.s V_16 + IL_00d2: ldloc.s V_16 + IL_00d4: ldc.i4.3 + IL_00d5: conv.i8 + IL_00d6: blt.un.s IL_00bb + + IL_00d8: ldloca.s V_15 + IL_00da: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_00df: stloc.s V_14 + IL_00e1: ldloc.s V_9 + IL_00e3: ldloc.s V_10 + IL_00e5: ldloc.s V_14 + IL_00e7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Zip3(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_00ec: stloc.s V_18 + IL_00ee: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::@_instance + IL_00f3: ldloc.s V_18 + IL_00f5: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [runtime]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_00fa: stloc.s V_19 + IL_00fc: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::@_instance + IL_0101: ldloc.s V_19 + IL_0103: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [runtime]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0108: stloc.s V_8 + IL_010a: ldloc.0 + IL_010b: ldloc.s V_8 + IL_010d: newobj instance void class [runtime]System.Tuple`2>,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::.ctor(!0, + !1) + IL_0112: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.il.bsl index d25cda2b2711..3502e1e886d5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -103,7 +93,7 @@ IL_002d: ldc.i4.1 IL_002e: ldc.i4.1 IL_002f: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_0034: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current IL_0039: ldc.i4.1 IL_003a: ret @@ -115,7 +105,7 @@ IL_0043: ldc.i4.2 IL_0044: ldc.i4.2 IL_0045: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) + !1) IL_004a: stfld class [runtime]System.Tuple`2 assembly/seq1@9::current IL_004f: ldc.i4.1 IL_0050: ret @@ -397,269 +387,291 @@ int32[0...,0...,0...,0...] V_8, int32[] V_9, int32[] V_10, - int32 V_11, - class [runtime]System.Tuple`4 V_12, - class [runtime]System.Tuple`4 V_13, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_11, + uint64 V_12, + int32 V_13, int32 V_14, - class [runtime]System.Tuple`3 V_15, - class [runtime]System.Tuple`3 V_16, + class [runtime]System.Tuple`4 V_15, + class [runtime]System.Tuple`4 V_16, int32 V_17, - class [runtime]System.Tuple`4 V_18, - class [runtime]System.Tuple`4 V_19, - int32 V_20) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.1 - IL_0002: ldc.i4.s 10 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_0009: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_000e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_0013: dup - IL_0014: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::alist@5 - IL_0019: stloc.0 - IL_001a: ldc.i4.3 - IL_001b: newarr [runtime]System.Int32 - IL_0020: dup - IL_0021: ldc.i4.0 - IL_0022: ldc.i4.1 - IL_0023: stelem [runtime]System.Int32 - IL_0028: dup - IL_0029: ldc.i4.1 - IL_002a: ldc.i4.2 - IL_002b: stelem [runtime]System.Int32 - IL_0030: dup - IL_0031: ldc.i4.2 - IL_0032: ldc.i4.3 - IL_0033: stelem [runtime]System.Int32 - IL_0038: dup - IL_0039: stsfld int32[] ''.$assembly::array@6 - IL_003e: stloc.1 - IL_003f: ldc.i4.1 - IL_0040: ldc.i4.1 - IL_0041: ldc.i4.s 10 - IL_0043: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_0048: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_004d: dup - IL_004e: stsfld class [runtime]System.Collections.Generic.IEnumerable`1 ''.$assembly::aseq@7 - IL_0053: stloc.2 - IL_0054: ldc.i4.1 - IL_0055: ldc.i4.1 - IL_0056: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_005b: ldc.i4.2 - IL_005c: ldc.i4.2 - IL_005d: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_0062: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::get_Empty() - IL_0067: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Cons(!0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_006c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Cons(!0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0071: dup - IL_0072: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$assembly::list1@8 - IL_0077: stloc.3 - IL_0078: ldc.i4.0 - IL_0079: ldnull - IL_007a: newobj instance void assembly/seq1@9::.ctor(int32, + class [runtime]System.Tuple`3 V_18, + class [runtime]System.Tuple`3 V_19, + int32 V_20, + class [runtime]System.Tuple`4 V_21, + class [runtime]System.Tuple`4 V_22, + int32 V_23) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.s V_12 + IL_0004: ldc.i4.1 + IL_0005: stloc.s V_13 + IL_0007: br.s IL_0020 + + IL_0009: ldloca.s V_11 + IL_000b: ldloc.s V_13 + IL_000d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0012: nop + IL_0013: ldloc.s V_13 + IL_0015: ldc.i4.1 + IL_0016: add + IL_0017: stloc.s V_13 + IL_0019: ldloc.s V_12 + IL_001b: ldc.i4.1 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.s V_12 + IL_0020: ldloc.s V_12 + IL_0022: ldc.i4.s 10 + IL_0024: conv.i8 + IL_0025: blt.un.s IL_0009 + + IL_0027: ldloca.s V_11 + IL_0029: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002e: dup + IL_002f: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::alist@5 + IL_0034: stloc.0 + IL_0035: ldc.i4.3 + IL_0036: newarr [runtime]System.Int32 + IL_003b: dup + IL_003c: ldc.i4.0 + IL_003d: ldc.i4.1 + IL_003e: stelem [runtime]System.Int32 + IL_0043: dup + IL_0044: ldc.i4.1 + IL_0045: ldc.i4.2 + IL_0046: stelem [runtime]System.Int32 + IL_004b: dup + IL_004c: ldc.i4.2 + IL_004d: ldc.i4.3 + IL_004e: stelem [runtime]System.Int32 + IL_0053: dup + IL_0054: stsfld int32[] ''.$assembly::array@6 + IL_0059: stloc.1 + IL_005a: ldc.i4.1 + IL_005b: ldc.i4.1 + IL_005c: ldc.i4.s 10 + IL_005e: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_0063: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [runtime]System.Collections.Generic.IEnumerable`1) + IL_0068: dup + IL_0069: stsfld class [runtime]System.Collections.Generic.IEnumerable`1 ''.$assembly::aseq@7 + IL_006e: stloc.2 + IL_006f: ldc.i4.1 + IL_0070: ldc.i4.1 + IL_0071: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0076: ldc.i4.2 + IL_0077: ldc.i4.2 + IL_0078: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_007d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::get_Empty() + IL_0082: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0087: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_008c: dup + IL_008d: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$assembly::list1@8 + IL_0092: stloc.3 + IL_0093: ldc.i4.0 + IL_0094: ldnull + IL_0095: newobj instance void assembly/seq1@9::.ctor(int32, class [runtime]System.Tuple`2) - IL_007f: dup - IL_0080: stsfld class [runtime]System.Collections.Generic.IEnumerable`1> ''.$assembly::seq1@9 - IL_0085: stloc.s V_4 - IL_0087: ldc.i4.2 - IL_0088: newarr class [runtime]System.Tuple`2 - IL_008d: dup - IL_008e: ldc.i4.0 - IL_008f: ldc.i4.1 - IL_0090: ldc.i4.1 - IL_0091: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_0096: stelem class [runtime]System.Tuple`2 - IL_009b: dup - IL_009c: ldc.i4.1 - IL_009d: ldc.i4.2 - IL_009e: ldc.i4.2 - IL_009f: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_00a4: stelem class [runtime]System.Tuple`2 - IL_00a9: dup - IL_00aa: stsfld class [runtime]System.Tuple`2[] ''.$assembly::array1@10 - IL_00af: stloc.s V_5 - IL_00b1: ldc.i4.2 - IL_00b2: ldc.i4.2 - IL_00b3: ldc.i4.0 - IL_00b4: call !!0[0...,0...] [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Create(int32, + IL_009a: dup + IL_009b: stsfld class [runtime]System.Collections.Generic.IEnumerable`1> ''.$assembly::seq1@9 + IL_00a0: stloc.s V_4 + IL_00a2: ldc.i4.2 + IL_00a3: newarr class [runtime]System.Tuple`2 + IL_00a8: dup + IL_00a9: ldc.i4.0 + IL_00aa: ldc.i4.1 + IL_00ab: ldc.i4.1 + IL_00ac: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_00b1: stelem class [runtime]System.Tuple`2 + IL_00b6: dup + IL_00b7: ldc.i4.1 + IL_00b8: ldc.i4.2 + IL_00b9: ldc.i4.2 + IL_00ba: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_00bf: stelem class [runtime]System.Tuple`2 + IL_00c4: dup + IL_00c5: stsfld class [runtime]System.Tuple`2[] ''.$assembly::array1@10 + IL_00ca: stloc.s V_5 + IL_00cc: ldc.i4.2 + IL_00cd: ldc.i4.2 + IL_00ce: ldc.i4.0 + IL_00cf: call !!0[0...,0...] [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Create(int32, int32, !!0) - IL_00b9: dup - IL_00ba: stsfld int32[0...,0...] ''.$assembly::a3@11 - IL_00bf: stloc.s V_6 - IL_00c1: ldc.i4.3 - IL_00c2: ldc.i4.3 - IL_00c3: ldc.i4.3 - IL_00c4: ldc.i4.0 - IL_00c5: call !!0[0...,0...,0...] [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Create(int32, + IL_00d4: dup + IL_00d5: stsfld int32[0...,0...] ''.$assembly::a3@11 + IL_00da: stloc.s V_6 + IL_00dc: ldc.i4.3 + IL_00dd: ldc.i4.3 + IL_00de: ldc.i4.3 + IL_00df: ldc.i4.0 + IL_00e0: call !!0[0...,0...,0...] [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Create(int32, int32, int32, !!0) - IL_00ca: dup - IL_00cb: stsfld int32[0...,0...,0...] ''.$assembly::array3D@12 - IL_00d0: stloc.s V_7 - IL_00d2: ldc.i4.4 - IL_00d3: ldc.i4.4 - IL_00d4: ldc.i4.4 - IL_00d5: ldc.i4.4 - IL_00d6: ldc.i4.0 - IL_00d7: call !!0[0...,0...,0...,0...] [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Create(int32, + IL_00e5: dup + IL_00e6: stsfld int32[0...,0...,0...] ''.$assembly::array3D@12 + IL_00eb: stloc.s V_7 + IL_00ed: ldc.i4.4 + IL_00ee: ldc.i4.4 + IL_00ef: ldc.i4.4 + IL_00f0: ldc.i4.4 + IL_00f1: ldc.i4.0 + IL_00f2: call !!0[0...,0...,0...,0...] [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Create(int32, int32, int32, int32, !!0) - IL_00dc: dup - IL_00dd: stsfld int32[0...,0...,0...,0...] ''.$assembly::array4D@13 - IL_00e2: stloc.s V_8 - IL_00e4: call int32[] assembly::get_array() - IL_00e9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::OfArray(!!0[]) - IL_00ee: pop - IL_00ef: call class [runtime]System.Collections.Generic.IEnumerable`1 assembly::get_aseq() - IL_00f4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::OfSeq(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_00f9: pop - IL_00fa: call class [runtime]System.Tuple`2[] assembly::get_array1() - IL_00ff: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpMap`2 [FSharp.Core]Microsoft.FSharp.Collections.MapModule::OfArray(class [runtime]System.Tuple`2[]) - IL_0104: pop - IL_0105: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> assembly::get_list1() - IL_010a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpMap`2 [FSharp.Core]Microsoft.FSharp.Collections.MapModule::OfList(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>) - IL_010f: pop - IL_0110: call class [runtime]System.Collections.Generic.IEnumerable`1> assembly::get_seq1() - IL_0115: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpMap`2 [FSharp.Core]Microsoft.FSharp.Collections.MapModule::OfSeq(class [runtime]System.Collections.Generic.IEnumerable`1>) - IL_011a: pop - IL_011b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_alist() - IL_0120: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::OfList(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0125: dup - IL_0126: stsfld int32[] ''.$assembly::a1@25 - IL_012b: stloc.s V_9 - IL_012d: call class [runtime]System.Collections.Generic.IEnumerable`1 assembly::get_aseq() - IL_0132: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::OfSeq(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_0137: dup - IL_0138: stsfld int32[] ''.$assembly::a2@26 - IL_013d: stloc.s V_10 - IL_013f: call int32[] assembly::get_a1() - IL_0144: ldc.i4.0 - IL_0145: call !!0 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Get(!!0[], + IL_00f7: dup + IL_00f8: stsfld int32[0...,0...,0...,0...] ''.$assembly::array4D@13 + IL_00fd: stloc.s V_8 + IL_00ff: call int32[] assembly::get_array() + IL_0104: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::OfArray(!!0[]) + IL_0109: pop + IL_010a: call class [runtime]System.Collections.Generic.IEnumerable`1 assembly::get_aseq() + IL_010f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::OfSeq(class [runtime]System.Collections.Generic.IEnumerable`1) + IL_0114: pop + IL_0115: call class [runtime]System.Tuple`2[] assembly::get_array1() + IL_011a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpMap`2 [FSharp.Core]Microsoft.FSharp.Collections.MapModule::OfArray(class [runtime]System.Tuple`2[]) + IL_011f: pop + IL_0120: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> assembly::get_list1() + IL_0125: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpMap`2 [FSharp.Core]Microsoft.FSharp.Collections.MapModule::OfList(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>) + IL_012a: pop + IL_012b: call class [runtime]System.Collections.Generic.IEnumerable`1> assembly::get_seq1() + IL_0130: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpMap`2 [FSharp.Core]Microsoft.FSharp.Collections.MapModule::OfSeq(class [runtime]System.Collections.Generic.IEnumerable`1>) + IL_0135: pop + IL_0136: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_alist() + IL_013b: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::OfList(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0140: dup + IL_0141: stsfld int32[] ''.$assembly::a1@25 + IL_0146: stloc.s V_9 + IL_0148: call class [runtime]System.Collections.Generic.IEnumerable`1 assembly::get_aseq() + IL_014d: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::OfSeq(class [runtime]System.Collections.Generic.IEnumerable`1) + IL_0152: dup + IL_0153: stsfld int32[] ''.$assembly::a2@26 + IL_0158: stloc.s V_10 + IL_015a: call int32[] assembly::get_a1() + IL_015f: ldc.i4.0 + IL_0160: call !!0 [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Get(!!0[], int32) - IL_014a: stloc.s V_11 - IL_014c: call int32[] assembly::get_a2() - IL_0151: ldc.i4.0 - IL_0152: ldloc.s V_11 - IL_0154: call void [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Set(!!0[], + IL_0165: stloc.s V_14 + IL_0167: call int32[] assembly::get_a2() + IL_016c: ldc.i4.0 + IL_016d: ldloc.s V_14 + IL_016f: call void [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Set(!!0[], int32, !!0) - IL_0159: nop - IL_015a: call int32[0...,0...] assembly::get_a3() - IL_015f: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Length1(!!0[0...,0...]) - IL_0164: call int32[0...,0...] assembly::get_a3() - IL_0169: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Length2(!!0[0...,0...]) - IL_016e: call int32[0...,0...] assembly::get_a3() - IL_0173: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Base1(!!0[0...,0...]) - IL_0178: call int32[0...,0...] assembly::get_a3() - IL_017d: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Base2(!!0[0...,0...]) - IL_0182: newobj instance void class [runtime]System.Tuple`4::.ctor(!0, - !1, - !2, - !3) - IL_0187: stloc.s V_12 - IL_0189: ldloc.s V_12 - IL_018b: stloc.s V_13 - IL_018d: call int32[0...,0...] assembly::get_a3() - IL_0192: ldc.i4.0 - IL_0193: ldc.i4.0 - IL_0194: call !!0 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Get(!!0[0...,0...], + IL_0174: nop + IL_0175: call int32[0...,0...] assembly::get_a3() + IL_017a: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Length1(!!0[0...,0...]) + IL_017f: call int32[0...,0...] assembly::get_a3() + IL_0184: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Length2(!!0[0...,0...]) + IL_0189: call int32[0...,0...] assembly::get_a3() + IL_018e: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Base1(!!0[0...,0...]) + IL_0193: call int32[0...,0...] assembly::get_a3() + IL_0198: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Base2(!!0[0...,0...]) + IL_019d: newobj instance void class [runtime]System.Tuple`4::.ctor(!0, + !1, + !2, + !3) + IL_01a2: stloc.s V_15 + IL_01a4: ldloc.s V_15 + IL_01a6: stloc.s V_16 + IL_01a8: call int32[0...,0...] assembly::get_a3() + IL_01ad: ldc.i4.0 + IL_01ae: ldc.i4.0 + IL_01af: call !!0 [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Get(!!0[0...,0...], int32, int32) - IL_0199: stloc.s V_14 - IL_019b: call int32[0...,0...] assembly::get_a3() - IL_01a0: ldc.i4.0 - IL_01a1: ldc.i4.0 - IL_01a2: ldloc.s V_14 - IL_01a4: call void [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Set(!!0[0...,0...], + IL_01b4: stloc.s V_17 + IL_01b6: call int32[0...,0...] assembly::get_a3() + IL_01bb: ldc.i4.0 + IL_01bc: ldc.i4.0 + IL_01bd: ldloc.s V_17 + IL_01bf: call void [FSharp.Core]Microsoft.FSharp.Collections.Array2DModule::Set(!!0[0...,0...], int32, int32, !!0) - IL_01a9: nop - IL_01aa: call int32[0...,0...,0...] assembly::get_array3D() - IL_01af: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Length1(!!0[0...,0...,0...]) - IL_01b4: call int32[0...,0...,0...] assembly::get_array3D() - IL_01b9: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Length2(!!0[0...,0...,0...]) - IL_01be: call int32[0...,0...,0...] assembly::get_array3D() - IL_01c3: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Length3(!!0[0...,0...,0...]) - IL_01c8: newobj instance void class [runtime]System.Tuple`3::.ctor(!0, - !1, - !2) - IL_01cd: stloc.s V_15 - IL_01cf: ldloc.s V_15 - IL_01d1: stloc.s V_16 - IL_01d3: call int32[0...,0...,0...] assembly::get_array3D() - IL_01d8: ldc.i4.0 - IL_01d9: ldc.i4.0 - IL_01da: ldc.i4.0 - IL_01db: call !!0 [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Get(!!0[0...,0...,0...], + IL_01c4: nop + IL_01c5: call int32[0...,0...,0...] assembly::get_array3D() + IL_01ca: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Length1(!!0[0...,0...,0...]) + IL_01cf: call int32[0...,0...,0...] assembly::get_array3D() + IL_01d4: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Length2(!!0[0...,0...,0...]) + IL_01d9: call int32[0...,0...,0...] assembly::get_array3D() + IL_01de: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Length3(!!0[0...,0...,0...]) + IL_01e3: newobj instance void class [runtime]System.Tuple`3::.ctor(!0, + !1, + !2) + IL_01e8: stloc.s V_18 + IL_01ea: ldloc.s V_18 + IL_01ec: stloc.s V_19 + IL_01ee: call int32[0...,0...,0...] assembly::get_array3D() + IL_01f3: ldc.i4.0 + IL_01f4: ldc.i4.0 + IL_01f5: ldc.i4.0 + IL_01f6: call !!0 [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Get(!!0[0...,0...,0...], int32, int32, int32) - IL_01e0: stloc.s V_17 - IL_01e2: call int32[0...,0...,0...] assembly::get_array3D() - IL_01e7: ldc.i4.0 - IL_01e8: ldc.i4.0 - IL_01e9: ldc.i4.0 - IL_01ea: ldloc.s V_17 - IL_01ec: call void [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Set(!!0[0...,0...,0...], + IL_01fb: stloc.s V_20 + IL_01fd: call int32[0...,0...,0...] assembly::get_array3D() + IL_0202: ldc.i4.0 + IL_0203: ldc.i4.0 + IL_0204: ldc.i4.0 + IL_0205: ldloc.s V_20 + IL_0207: call void [FSharp.Core]Microsoft.FSharp.Collections.Array3DModule::Set(!!0[0...,0...,0...], int32, int32, int32, !!0) - IL_01f1: nop - IL_01f2: call int32[0...,0...,0...,0...] assembly::get_array4D() - IL_01f7: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Length1(!!0[0...,0...,0...,0...]) - IL_01fc: call int32[0...,0...,0...,0...] assembly::get_array4D() - IL_0201: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Length2(!!0[0...,0...,0...,0...]) - IL_0206: call int32[0...,0...,0...,0...] assembly::get_array4D() - IL_020b: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Length3(!!0[0...,0...,0...,0...]) - IL_0210: call int32[0...,0...,0...,0...] assembly::get_array4D() - IL_0215: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Length4(!!0[0...,0...,0...,0...]) - IL_021a: newobj instance void class [runtime]System.Tuple`4::.ctor(!0, - !1, - !2, - !3) - IL_021f: stloc.s V_18 - IL_0221: ldloc.s V_18 - IL_0223: stloc.s V_19 - IL_0225: call int32[0...,0...,0...,0...] assembly::get_array4D() - IL_022a: ldc.i4.0 - IL_022b: ldc.i4.0 - IL_022c: ldc.i4.0 - IL_022d: ldc.i4.0 - IL_022e: call !!0 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Get(!!0[0...,0...,0...,0...], + IL_020c: nop + IL_020d: call int32[0...,0...,0...,0...] assembly::get_array4D() + IL_0212: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Length1(!!0[0...,0...,0...,0...]) + IL_0217: call int32[0...,0...,0...,0...] assembly::get_array4D() + IL_021c: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Length2(!!0[0...,0...,0...,0...]) + IL_0221: call int32[0...,0...,0...,0...] assembly::get_array4D() + IL_0226: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Length3(!!0[0...,0...,0...,0...]) + IL_022b: call int32[0...,0...,0...,0...] assembly::get_array4D() + IL_0230: call int32 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Length4(!!0[0...,0...,0...,0...]) + IL_0235: newobj instance void class [runtime]System.Tuple`4::.ctor(!0, + !1, + !2, + !3) + IL_023a: stloc.s V_21 + IL_023c: ldloc.s V_21 + IL_023e: stloc.s V_22 + IL_0240: call int32[0...,0...,0...,0...] assembly::get_array4D() + IL_0245: ldc.i4.0 + IL_0246: ldc.i4.0 + IL_0247: ldc.i4.0 + IL_0248: ldc.i4.0 + IL_0249: call !!0 [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Get(!!0[0...,0...,0...,0...], int32, int32, int32, int32) - IL_0233: stloc.s V_20 - IL_0235: call int32[0...,0...,0...,0...] assembly::get_array4D() - IL_023a: ldc.i4.0 - IL_023b: ldc.i4.0 - IL_023c: ldc.i4.0 - IL_023d: ldc.i4.0 - IL_023e: ldloc.s V_20 - IL_0240: call void [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Set(!!0[0...,0...,0...,0...], + IL_024e: stloc.s V_23 + IL_0250: call int32[0...,0...,0...,0...] assembly::get_array4D() + IL_0255: ldc.i4.0 + IL_0256: ldc.i4.0 + IL_0257: ldc.i4.0 + IL_0258: ldc.i4.0 + IL_0259: ldloc.s V_23 + IL_025b: call void [FSharp.Core]Microsoft.FSharp.Collections.Array4DModule::Set(!!0[0...,0...,0...,0...], int32, int32, int32, int32, !!0) - IL_0245: nop - IL_0246: ret + IL_0260: nop + IL_0261: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOff.il.bsl index 1815b1427cbe..cf3ef015691f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOff.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -56,42 +46,64 @@ { .entrypoint - .maxstack 5 + .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - int32 V_2) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.1 - IL_0002: ldc.i4.3 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_0008: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [runtime]System.Collections.Generic.IEnumerable`1) - IL_0012: stloc.0 - IL_0013: ldloc.0 - IL_0014: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0019: stloc.1 - IL_001a: br.s IL_0042 - - IL_001c: ldloc.0 - IL_001d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0022: stloc.2 - IL_0023: ldstr "%A" - IL_0028: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) - IL_002d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0032: ldloc.2 - IL_0033: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0038: pop - IL_0039: ldloc.1 - IL_003a: stloc.0 - IL_003b: ldloc.0 - IL_003c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0041: stloc.1 - IL_0042: ldloc.1 - IL_0043: brtrue.s IL_001c - - IL_0045: ret + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, + uint64 V_2, + int32 V_3, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4, + int32 V_5) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.2 + IL_0003: ldc.i4.1 + IL_0004: stloc.3 + IL_0005: br.s IL_0019 + + IL_0007: ldloca.s V_1 + IL_0009: ldloc.3 + IL_000a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_000f: nop + IL_0010: ldloc.3 + IL_0011: ldc.i4.1 + IL_0012: add + IL_0013: stloc.3 + IL_0014: ldloc.2 + IL_0015: ldc.i4.1 + IL_0016: conv.i8 + IL_0017: add + IL_0018: stloc.2 + IL_0019: ldloc.2 + IL_001a: ldc.i4.3 + IL_001b: conv.i8 + IL_001c: blt.un.s IL_0007 + + IL_001e: ldloca.s V_1 + IL_0020: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0025: stloc.0 + IL_0026: ldloc.0 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002c: stloc.s V_4 + IL_002e: br.s IL_005a + + IL_0030: ldloc.0 + IL_0031: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0036: stloc.s V_5 + IL_0038: ldstr "%A" + IL_003d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_0042: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_004e: pop + IL_004f: ldloc.s V_4 + IL_0051: stloc.0 + IL_0052: ldloc.0 + IL_0053: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0058: stloc.s V_4 + IL_005a: ldloc.s V_4 + IL_005c: brtrue.s IL_0030 + + IL_005e: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs index 3516864c122f..5e8206137b11 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs @@ -45,7 +45,6 @@ module Misc = let ``CodeGenRenamings01_RealInternalSignatureOn_fs`` compilation = compilation |> withRealInternalSignatureOn - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> asExe |> verifyCompilation @@ -117,7 +116,6 @@ module Misc = let ``ForLoop01_RealInternalSignatureOn_fs`` compilation = compilation |> withRealInternalSignatureOn - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> asExe |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullnessMetadata.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullnessMetadata.fs index 061c6dba9d7b..4e93000186c5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullnessMetadata.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullnessMetadata.fs @@ -10,7 +10,6 @@ type Optimize = Optimize | DoNotOptimize let verifyCompilation (o:Optimize) compilation = compilation - |> withLangVersionPreview |> withOptions ["--checknulls"] |> (match o with | Optimize -> withOptimize | DoNotOptimize -> withNoOptimize) |> withNoDebug @@ -97,7 +96,6 @@ module Interop = let fsharpLibCreator = FSharp >> asLibrary - >> withLangVersionPreview >> withName "MyFSharpLib" >> withOptions ["--checknulls"] diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeInitialization.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeInitialization.fs index 19165b3fe8ca..fe209b3e50e3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeInitialization.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeInitialization.fs @@ -33,7 +33,6 @@ module MyModule = printfn "Hello from main method" 0 """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -60,7 +59,6 @@ type MySecondType = printfn "Hello from implicit main method" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -92,7 +90,6 @@ module MyModule = printfn "Hello from main method" 0 """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> withStdOutContainsAllInOrder [ @@ -132,7 +129,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -171,7 +167,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -210,7 +205,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -248,7 +242,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -286,7 +279,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -325,7 +317,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> withStdOutContainsAllInOrder [ @@ -370,7 +361,6 @@ type FSharpSource with module doit = printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -408,7 +398,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -449,7 +438,6 @@ let message = FSharpSourceFromFile.SetIt ("Here is something") printfn $"{message}" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -487,7 +475,6 @@ type MyClass = printfn "%A" (MyClass.result()) """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> withNoOptimize |> compileExeAndRun @@ -854,7 +841,6 @@ namespace Microsoft.FSharp.Core.CompilerServices loop () """ |> asExe - |> withLangVersionPreview |> withRealInternalSignature realSig |> withOptimize |> compileAndRun diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibility.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibility.fs index acd800eb0a63..cb0e4d3168e3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibility.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibility.fs @@ -25,7 +25,6 @@ type public TypeThree private () = class end type public TypeFour () = class end """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -73,7 +72,6 @@ type private TypeThree private () = class end type private TypeFour () = class end """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -161,7 +159,6 @@ type public TestType () = member _.DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -251,7 +248,6 @@ type public TestType () = member _.DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -341,7 +337,6 @@ type public TestType () = member val DefaultProperty = 0 with get, set """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -567,7 +562,6 @@ type public TestType () = member val DefaultProperty = 0 with get, set """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -801,7 +795,6 @@ type public TestType () = member _.MixedPropertyTwelve with private get() = 0 and set (_:int) = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -1243,7 +1236,6 @@ type private TestType () = member _.MixedPropertyTwelve with private get() = 0 and set (_:int) = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -1677,7 +1669,6 @@ type public TestType () = static member DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -1767,7 +1758,6 @@ type public TestType () = static member DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -1856,7 +1846,6 @@ type public TestType () = static member val private PrivateProperty = 0 with get, set static member val DefaultProperty = 0 with get, set""" |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -2193,7 +2182,6 @@ type private TestType () = static member val private PrivateProperty = 0 with get, set static member val DefaultProperty = 0 with get, set""" |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -2427,7 +2415,6 @@ type public TestType () = static member MixedPropertyTwelve with private get() = 0 and set (_:int) = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -2869,7 +2856,6 @@ type private TestType () = static member MixedPropertyTwelve with private get() = 0 and set (_:int) = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityModuleRoot.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityModuleRoot.fs index 318a5f3a7cbe..763bbc9c33eb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityModuleRoot.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityModuleRoot.fs @@ -25,7 +25,6 @@ type public TypeThree private () = class end type public TypeFour () = class end """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -93,7 +92,6 @@ type private TypeTwo internal () = class end type private TypeThree private () = class end type private TypeFour () = class end""" |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -257,7 +255,6 @@ type public TestType () = member _.DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -289,7 +286,6 @@ type public TestType () = member _.DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -322,7 +318,6 @@ type public TestType () = member val DefaultProperty = 0 with get, set """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -363,7 +358,6 @@ type public TestType () = member val DefaultProperty = 0 with get, set """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -412,7 +406,6 @@ type public TestType () = member _.MixedPropertyTwelve with private get() = 0 and set (_:int) = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -493,7 +486,6 @@ type private TestType () = member _.MixedPropertyTwelve with private get() = 0 and set (_:int) = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -566,7 +558,6 @@ type public TestType () = static member DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -599,7 +590,6 @@ type private TestType () = static member DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -631,7 +621,6 @@ type public TestType () = static member val private PrivateProperty = 0 with get, set static member val DefaultProperty = 0 with get, set""" |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -670,7 +659,6 @@ type private TestType () = static member val private PrivateProperty = 0 with get, set static member val DefaultProperty = 0 with get, set""" |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -718,7 +706,6 @@ type public TestType () = static member MixedPropertyTwelve with private get() = 0 and set (_:int) = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -799,7 +786,6 @@ type private TestType () = static member MixedPropertyTwelve with private get() = 0 and set (_:int) = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -873,7 +859,6 @@ module internal SR = SR.getLazyThing () """ |> asExe - |> withLangVersionPreview |> withOptimize |> withRealInternalSignature realSig |> compileExeAndRun diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityModuleRootWithFsi.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityModuleRootWithFsi.fs index 4d7d55c1e8e2..8dc1184ea3ad 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityModuleRootWithFsi.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityModuleRootWithFsi.fs @@ -33,7 +33,6 @@ type TypeFour () = class end type HiddenType () = class end """)) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -252,7 +251,6 @@ type TypeFour () = class end type HiddenType () = class end """)) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -461,7 +459,6 @@ type TestType () = member _.DefaultMethod() = () member _.HiddenMethod() = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -503,7 +500,6 @@ type TestType () = member _.DefaultMethod() = () member _.HiddenMethod() = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -547,7 +543,6 @@ type TestType () = member val PrivateProperty = 0 with get, set member val DefaultProperty = 0 with get, set""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -600,7 +595,6 @@ type TestType () = member val DefaultProperty = 0 with get, set member val HiddenProperty = 0 with get, set""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -680,7 +674,6 @@ type public TestType () = member _.MixedPropertyEleven with get() = 0 and set (_:int) = () member _.MixedPropertyTwelve with get() = 0 and set (_:int) = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -788,7 +781,6 @@ type public TestType () = member _.MixedPropertyEleven with get() = 0 and set (_:int) = () member _.MixedPropertyTwelve with get() = 0 and set (_:int) = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -903,7 +895,6 @@ type public TestType () = static member DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -948,7 +939,6 @@ type TestType () = static member val DefaultProperty = 0 with get, set static member val HiddenProperty = 0 with get, set""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -1004,7 +994,6 @@ type TestType () = static member val PrivateProperty = 0 with get, set static member val DefaultProperty = 0 with get, set""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -1081,7 +1070,6 @@ type public TestType () = static member MixedPropertyEleven with internal get() = 0 and set (_:int) = () static member MixedPropertyTwelve with private get() = 0 and set (_:int) = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -1191,7 +1179,6 @@ type private TestType () = static member MixedPropertyEleven with internal get() = 0 and set (_:int) = () static member MixedPropertyTwelve with private get() = 0 and set (_:int) = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityNamespaceRoot.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityNamespaceRoot.fs index c12fe0c6829d..695d6cd8ba23 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityNamespaceRoot.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityNamespaceRoot.fs @@ -25,7 +25,6 @@ type public TypeThree private () = class end type public TypeFour () = class end """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -191,7 +190,6 @@ type private TypeThree private () = class end type private TypeFour () = class end """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -285,7 +283,6 @@ type public TestType () = member _.DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -317,7 +314,6 @@ type private TestType () = member _.DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -350,7 +346,6 @@ type public TestType () = member val DefaultProperty = 0 with get, set """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -391,7 +386,6 @@ type public TestType () = member val DefaultProperty = 0 with get, set """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -440,7 +434,6 @@ type public TestType () = member _.MixedPropertyTwelve with private get() = 0 and set (_:int) = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -523,7 +516,6 @@ type private TestType () = member _.MixedPropertyTwelve with private get() = 0 and set (_:int) = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -595,7 +587,6 @@ type public TestType () = static member DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -627,7 +618,6 @@ type public TestType () = static member DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -659,7 +649,6 @@ type public TestType () = static member val private PrivateProperty = 0 with get, set static member val DefaultProperty = 0 with get, set""" |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -699,7 +688,6 @@ type private TestType () = static member val private PrivateProperty = 0 with get, set static member val DefaultProperty = 0 with get, set""" |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -748,7 +736,6 @@ type public TestType () = static member MixedPropertyTwelve with private get() = 0 and set (_:int) = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -829,7 +816,6 @@ type private TestType () = static member MixedPropertyTwelve with private get() = 0 and set (_:int) = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityNamespaceRootWithFsi.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityNamespaceRootWithFsi.fs index 6f3b58e6f667..39e9658c2260 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityNamespaceRootWithFsi.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ClassTypeVisibilityNamespaceRootWithFsi.fs @@ -33,7 +33,6 @@ type TypeFour () = class end type HiddenType () = class end """)) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -243,7 +242,6 @@ type TypeFour () = class end type HiddenType () = class end """)) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -362,7 +360,6 @@ type TestType () = member _.DefaultMethod() = () member _.HiddenMethod() = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -405,7 +402,6 @@ type TestType () = member _.DefaultMethod() = () member _.HiddenMethod() = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -452,7 +448,6 @@ type TestType () = member val DefaultProperty = 0 with get, set member val HiddenProperty = 0 with get, set""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -509,7 +504,6 @@ type TestType () = member val DefaultProperty = 0 with get, set member val HiddenProperty = 0 with get, set""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -589,7 +583,6 @@ type public TestType () = member _.MixedPropertyEleven with get() = 0 and set (_:int) = () member _.MixedPropertyTwelve with get() = 0 and set (_:int) = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -699,7 +692,6 @@ type public TestType () = member _.MixedPropertyEleven with get() = 0 and set (_:int) = () member _.MixedPropertyTwelve with get() = 0 and set (_:int) = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -779,7 +771,6 @@ type TestType () = static member DefaultMethod() = () static member HiddenMethod() = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -814,7 +805,6 @@ type public TestType () = static member DefaultMethod() = () """ |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -859,7 +849,6 @@ type TestType () = static member val DefaultProperty = 0 with get, set static member val HiddenProperty = 0 with get, set""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -916,7 +905,6 @@ type TestType () = static member val DefaultProperty = 0 with get, set static member val HiddenProperty = 0 with get, set""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -997,7 +985,6 @@ type public TestType () = static member MixedPropertyEleven with internal get() = 0 and set (_:int) = () static member MixedPropertyTwelve with private get() = 0 and set (_:int) = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -1107,7 +1094,6 @@ type private TestType () = static member MixedPropertyEleven with internal get() = 0 and set (_:int) = () static member MixedPropertyTwelve with private get() = 0 and set (_:int) = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -1186,7 +1172,6 @@ type TestType () = static member DefaultMethod() = () static member HiddenMethod() = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ @@ -1231,7 +1216,6 @@ type TestType () = static member DefaultMethod() = () static member HiddenMethod() = ()""")) |> asLibrary - |> withLangVersionPreview |> withRealInternalSignature realSig |> compile |> withILContains [ diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ModuleInitialization.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ModuleInitialization.fs index 8666aaad2ac7..00c1c1394cc2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ModuleInitialization.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/ModuleInitialization.fs @@ -334,7 +334,6 @@ type MyType = static let x1 = 1100 + System.Random().Next(0) static let _ = printfn "Hello, World from MyLibrary.MyType" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -367,7 +366,6 @@ type MyType = printfn $"{{C.P2}}" if C.P2 <> 6 then failwith $"Invalid result: C.P2 <> 6 - actual: {{C.P2}}" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> withOptions [ "--nowarn:3370"; "--debug+"; "--optimize-" ] |> compileExeAndRun @@ -399,7 +397,6 @@ module {recursive} MyModule = printfn "Hello from main method" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -449,7 +446,6 @@ module {{recursive}} MyModule = printfn "Hello from main method" 0 """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -507,7 +503,6 @@ module rec MyModule = 0 """ |> withFlavor release - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -543,7 +538,6 @@ module internal PrintfImpl printfn $"FormatParser.prefix: {FormatParser().GetStepsForCapturedFormat()}" printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -579,7 +573,6 @@ module doit = createFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -603,7 +596,6 @@ module private TestReferences = module doSomething = printfn $"{TestReferences.NetStandard20.Files.netStandard.Value}" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -638,7 +630,6 @@ module Test6 let public getInt (data:Data): int = HelperModule.handle data.Thing """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> asLibrary |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/RealInternalSignature.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/RealInternalSignature.fs index d40a8b5484cd..2f03e5de0e37 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/RealInternalSignature.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RealInternalSignature/RealInternalSignature.fs @@ -334,7 +334,6 @@ type MyType = static let x1 = 1100 + System.Random().Next(0) static let _ = printfn "Hello, World from MyLibrary.MyType" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -365,7 +364,6 @@ module MyModule = printfn "Hello from main method" 0 """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -396,7 +394,6 @@ module MyModule = printfn "Hello from main method" 0 """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -428,7 +425,6 @@ module MyModule = printfn "Hello from main method" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -463,7 +459,6 @@ module MyModule = printfn "Hello from main method" 0 """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -495,7 +490,6 @@ module internal PrintfImpl printfn $"FormatParser.prefix: {FormatParser().GetStepsForCapturedFormat()}" printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -535,7 +529,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -574,7 +567,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -613,7 +605,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -651,7 +642,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -689,7 +679,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -728,7 +717,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -1042,7 +1030,6 @@ type FSharpSource with module doit = printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -1080,7 +1067,6 @@ module doit = FSharpSource.CreateFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -1115,7 +1101,6 @@ module doit = createFromFile("Hello") |> ignore printfn "Main program" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -1159,7 +1144,6 @@ let makeOne() = FSharpSourceFromFile.MakeOne() printfn $"{makeOne().FilePath}" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -1183,7 +1167,6 @@ module private TestReferences = module doSomething = printfn $"{TestReferences.NetStandard20.Files.netStandard.Value}" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -1212,7 +1195,6 @@ module private outer_private = module doSomething = printfn "Hello, World!" """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> compileExeAndRun |> shouldSucceed @@ -1248,7 +1230,6 @@ module Test6 let public getInt (data:Data): int = HelperModule.handle data.Thing """ - |> withLangVersionPreview |> withRealInternalSignature realSig |> asLibrary |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionStepping.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionStepping.fs index 1d7bc9c5b7f3..01a3c5d6fc41 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionStepping.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionStepping.fs @@ -107,7 +107,6 @@ module SeqExpressionStepping = let ``SeqExpressionSteppingTest07_RealInternalSignatureOn_fs`` compilation = compilation |> withRealInternalSignatureOn - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> verifyCompilation // SOURCE=SeqExpressionSteppingTest07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest7.exe" # SeqExpressionSteppingTest7.fs - @@ -115,6 +114,5 @@ module SeqExpressionStepping = let ``SeqExpressionSteppingTest07_RealInternalSignatureOff_fs`` compilation = compilation |> withRealInternalSignatureOff - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. |> verifyCompilation #endif \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringFormatAndInterpolation.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringFormatAndInterpolation.fs index 3038460f577f..c6fde4ad8af3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringFormatAndInterpolation.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringFormatAndInterpolation.fs @@ -41,7 +41,6 @@ module StringFormatAndInterpolation let f (s: string) = $"ab{{s}}" """ - |> withLangVersionPreview |> compile |> shouldSucceed |> verifyIL [""" @@ -60,7 +59,6 @@ module StringFormatAndInterpolation let c = "c" let str = $"ab{{c}}d" """ - |> withLangVersionPreview |> compile |> shouldSucceed |> verifyIL [""" @@ -79,7 +77,6 @@ module StringFormatAndInterpolation let str () = {str} """ - |> withLangVersionPreview |> compile |> shouldSucceed |> verifyIL [""" diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TupleElimination.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TupleElimination.fs index d14b6d2240c9..f01f31797de1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TupleElimination.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TupleElimination.fs @@ -8,7 +8,10 @@ open FSharp.Test.Compiler module ``TupleElimination`` = - let compile cu = cu |> withCheckNulls |> withLangVersionPreview |> compile + let compile cu = + cu + |> withCheckNulls + |> compile [] let ``Sequence expressions with potential side effects do not prevent tuple elimination``() = diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ActivePatternArgCountMismatchTest.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ActivePatternArgCountMismatchTest.fs index e2a988ec0c3a..8c2133721d2c 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ActivePatternArgCountMismatchTest.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ActivePatternArgCountMismatchTest.fs @@ -18,7 +18,6 @@ module TooFew = let (|P|) (expr2 : int) (expr1 : int) = P match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -31,7 +30,6 @@ match 1 with P -> () let (|P|_|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then Some P else None match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -44,7 +42,6 @@ match 1 with P -> () let (|P|_|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then ValueSome P else ValueNone match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -57,7 +54,6 @@ match 1 with P -> () let (|P|Q|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then P else Q match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -70,7 +66,6 @@ match 1 with P -> () let (|P|_|) (expr2 : int) (expr1 : int) = expr1 = expr2 match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -83,7 +78,6 @@ match 1 with P -> () let (|P|) expr2 expr1 = P (expr1 + expr2) match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -96,7 +90,6 @@ match 1 with P -> () let (|P|_|) expr2 expr1 = if expr1 = expr2 then Some (P (expr1 + expr2)) else None match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -108,7 +101,6 @@ match 1 with P -> () let (|P|_|) expr2 expr1 = if expr1 = expr2 then Some (P (expr1 + expr2)) else None match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -121,7 +113,6 @@ let (|P|_|) expr2 expr1 = if expr1 = expr2 then Some (P (expr1 + expr2)) else No let expr2 = 2 match 1 with P expr2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -134,7 +125,6 @@ match 1 with P expr2 -> () let (|P|_|) expr2 expr1 = if expr1 = expr2 then ValueSome (P (expr1 + expr2)) else ValueNone match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -146,7 +136,6 @@ match 1 with P -> () let (|P|_|) expr2 expr1 = if expr1 = expr2 then ValueSome (P (expr1 + expr2)) else ValueNone match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -159,7 +148,6 @@ let (|P|_|) expr2 expr1 = if expr1 = expr2 then ValueSome (P (expr1 + expr2)) el let expr2 = 2 match 1 with P expr2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -172,7 +160,6 @@ match 1 with P expr2 -> () let (|P|Q|) expr2 expr1 = if expr1 = expr2 then P (expr1 + expr2) else Q match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -184,7 +171,6 @@ match 1 with P -> () let (|P|Q|) expr2 expr1 = if expr1 = expr2 then P (expr1 + expr2) else Q match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -197,7 +183,6 @@ let (|P|Q|) expr2 expr1 = if expr1 = expr2 then P (expr1 + expr2) else Q let expr2 = 2 match 1 with P expr2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -211,7 +196,6 @@ module Enough = let (|P|) expr1 = P match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -223,7 +207,6 @@ match 1 with P -> () let (|P|) expr1 = P match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -234,7 +217,6 @@ match 1 with P pat -> () let (|P|) expr1 = P match 1 with P () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -246,7 +228,6 @@ match 1 with P () -> () let (|P|_|) expr1 = if expr1 = 1 then Some P else None match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -258,7 +239,6 @@ match 1 with P -> () let (|P|_|) expr1 = if expr1 = 1 then Some P else None match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -269,7 +249,6 @@ match 1 with P pat -> () let (|P|_|) expr1 = if expr1 = 1 then Some P else None match 1 with P () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -281,7 +260,6 @@ match 1 with P () -> () let (|P|_|) expr1 = if expr1 = 1 then ValueSome P else ValueNone match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -293,7 +271,6 @@ match 1 with P -> () let (|P|_|) expr1 = if expr1 = 1 then ValueSome P else ValueNone match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -304,7 +281,6 @@ match 1 with P pat -> () let (|P|_|) expr1 = if expr1 = 1 then ValueSome P else ValueNone match 1 with P () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -316,7 +292,6 @@ match 1 with P () -> () let (|P|Q|) expr1 = if expr1 = 1 then P else Q match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -328,7 +303,6 @@ match 1 with P -> () let (|P|Q|) expr1 = if expr1 = 1 then P else Q match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -339,7 +313,6 @@ match 1 with P pat -> () let (|P|Q|) expr1 = if expr1 = 1 then P else Q match 1 with P () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -351,7 +324,6 @@ match 1 with P () -> () let (|P|_|) expr1 = expr1 = 1 match 1 with P -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -363,7 +335,6 @@ match 1 with P -> () let (|P|) (expr1 : int) = P expr1 match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -375,7 +346,6 @@ match 1 with P pat -> () let (|P|_|) (expr1 : int) = if expr1 = 1 then Some (P expr1) else None match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -387,7 +357,6 @@ match 1 with P pat -> () let (|P|_|) (expr1 : int) = if expr1 = 1 then ValueSome (P expr1) else ValueNone match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -399,7 +368,6 @@ match 1 with P pat -> () let (|P|Q|) (expr1 : int) = if expr1 = 1 then P expr1 else Q match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -412,7 +380,6 @@ let (|P|) (expr2 : int) (expr1 : int) = P let expr2 = 2 match 1 with P expr2 () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -425,7 +392,6 @@ let (|P|) (expr2 : int) (expr1 : int) = P let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -439,7 +405,6 @@ let expr2 = 2 let expr3 = 3 match 1 with P expr2 expr3 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -451,7 +416,6 @@ match 1 with P expr2 expr3 -> () let (|P|) (expr2 : int) (expr1 : int) = P match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -464,7 +428,6 @@ let (|P|) (expr2 : int) (expr1 : int) = P let expr2 = 2 match 1 with P expr2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -477,7 +440,6 @@ let (|P|_|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then Some P else None let expr2 = 2 match 1 with P expr2 () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -490,7 +452,6 @@ let (|P|_|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then Some P else None let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -504,7 +465,6 @@ let expr2 = 2 let expr3 = 3 match 1 with P expr2 expr3 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -515,7 +475,6 @@ match 1 with P expr2 expr3 -> () let (|P|_|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then Some P else None match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -528,7 +487,6 @@ let (|P|_|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then Some P else None let expr2 = 2 match 1 with P expr2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -541,7 +499,6 @@ let (|P|_|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then ValueSome P else let expr2 = 2 match 1 with P expr2 () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -554,7 +511,6 @@ let (|P|_|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then ValueSome P else let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -568,7 +524,6 @@ let expr2 = 2 let expr3 = 3 match 1 with P expr2 expr3 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -579,7 +534,6 @@ match 1 with P expr2 expr3 -> () let (|P|_|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then ValueSome P else ValueNone match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -605,7 +559,6 @@ let (|P|Q|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then P else Q let expr2 = 2 match 1 with P expr2 () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -618,7 +571,6 @@ let (|P|Q|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then P else Q let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -632,7 +584,6 @@ let expr2 = 2 let expr3 = 3 match 1 with P expr2 expr3 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -644,7 +595,6 @@ match 1 with P expr2 expr3 -> () let (|P|Q|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then P else Q match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -660,7 +610,6 @@ let (|P|Q|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then P else Q let expr2 = 2 match 1 with P expr2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -674,7 +623,6 @@ let (|P|_|) (expr2 : int) (expr1 : int) = expr1 = expr2 let expr2 = 2 match 1 with P expr2 () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -687,7 +635,6 @@ let (|P|_|) (expr2 : int) (expr1 : int) = expr1 = expr2 let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -701,7 +648,6 @@ let expr2 = 2 let expr3 = 3 match 1 with P expr2 expr3 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -713,7 +659,6 @@ match 1 with P expr2 expr3 -> () let (|P|_|) (expr2 : int) (expr1 : int) = expr1 = expr2 match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -726,7 +671,6 @@ let (|P|_|) (expr2 : int) (expr1 : int) = expr1 = expr2 let expr2 = 2 match 1 with P expr2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -740,7 +684,6 @@ let (|P|) expr2 expr1 = P (expr1 + expr2) let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -754,7 +697,6 @@ let expr2 = 2 let expr3 = 2 match 1 with P expr2 expr3 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -766,7 +708,6 @@ match 1 with P expr2 expr3 -> () let (|P|) expr2 expr1 = P (expr1 + expr2) match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -779,7 +720,6 @@ let (|P|) expr2 expr1 = P (expr1 + expr2) let expr2 = 2 match 1 with P expr2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -793,7 +733,6 @@ let (|P|_|) expr2 expr1 = if expr1 = expr2 then Some (P (expr1 + expr2)) else No let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -807,7 +746,6 @@ let expr2 = 2 let expr3 = 2 match 1 with P expr2 expr3 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -819,7 +757,6 @@ let (|P|_|) expr2 expr1 = if expr1 = expr2 then Some (P (expr1 + expr2)) else No let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -833,7 +770,6 @@ let (|P|_|) expr2 expr1 = if expr1 = expr2 then ValueSome (P (expr1 + expr2)) el let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -847,7 +783,6 @@ let expr2 = 2 let expr3 = 2 match 1 with P expr2 expr3 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -859,7 +794,6 @@ let (|P|_|) expr2 expr1 = if expr1 = expr2 then ValueSome (P (expr1 + expr2)) el let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldSucceed @@ -872,7 +806,6 @@ let (|P|Q|) expr2 expr1 = if expr1 = expr2 then P (expr1 + expr2) else Q let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -886,7 +819,6 @@ let expr2 = 2 let expr3 = 2 match 1 with P expr2 expr3 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -899,7 +831,6 @@ let (|P|Q|) expr2 expr1 = if expr1 = expr2 then P (expr1 + expr2) else Q let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -914,7 +845,6 @@ let (|P|) (expr1 : int) = P let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -927,7 +857,6 @@ let (|P|) (expr1 : int) = P let expr2 = 2 match 1 with P expr2 () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -940,7 +869,6 @@ let (|P|) (expr1 : int) = P let expr2 = 2 match 1 with P () expr2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -954,7 +882,6 @@ let (|P|_|) (expr1 : int) = if expr1 = 1 then Some P else None let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -967,7 +894,6 @@ let (|P|_|) (expr1 : int) = if expr1 = 1 then Some P else None let expr2 = 2 match 1 with P expr2 () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -980,7 +906,6 @@ let (|P|_|) (expr1 : int) = if expr1 = 1 then Some P else None let expr2 = 2 match 1 with P () expr2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -994,7 +919,6 @@ let (|P|_|) (expr1 : int) = if expr1 = 1 then ValueSome P else ValueNone let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1007,7 +931,6 @@ let (|P|_|) (expr1 : int) = if expr1 = 1 then ValueSome P else ValueNone let expr2 = 2 match 1 with P expr2 () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1020,7 +943,6 @@ let (|P|_|) (expr1 : int) = if expr1 = 1 then ValueSome P else ValueNone let expr2 = 2 match 1 with P () expr2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1034,7 +956,6 @@ let (|P|Q|) (expr1 : int) = if expr1 = 1 then P else Q let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1047,7 +968,6 @@ let (|P|Q|) (expr1 : int) = if expr1 = 1 then P else Q let expr2 = 2 match 1 with P expr2 () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1060,7 +980,6 @@ let (|P|Q|) (expr1 : int) = if expr1 = 1 then P else Q let expr2 = 2 match 1 with P () expr2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1073,7 +992,6 @@ match 1 with P () expr2 -> () let (|P|_|) expr1 = expr1 = 1 match 1 with P pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1087,7 +1005,6 @@ let (|P|) (expr1 : int) = P expr1 let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1100,7 +1017,6 @@ let (|P|) (expr1 : int) = P expr1 let expr2 = 2 match 1 with P expr2 () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1114,7 +1030,6 @@ let (|P|_|) (expr1 : int) = if expr1 = 1 then Some (P expr1) else None let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1127,7 +1042,6 @@ let (|P|_|) (expr1 : int) = if expr1 = 1 then Some (P expr1) else None let expr2 = 2 match 1 with P expr2 () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1141,7 +1055,6 @@ let (|P|_|) (expr1 : int) = if expr1 = 1 then ValueSome (P expr1) else ValueNone let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1154,7 +1067,6 @@ let (|P|_|) (expr1 : int) = if expr1 = 1 then ValueSome (P expr1) else ValueNone let expr2 = 2 match 1 with P expr2 () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1168,7 +1080,6 @@ let (|P|Q|) (expr1 : int) = if expr1 = 1 then P expr1 else Q let expr2 = 2 match 1 with P expr2 pat -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1181,7 +1092,6 @@ let (|P|Q|) (expr1 : int) = if expr1 = 1 then P expr1 else Q let expr2 = 2 match 1 with P expr2 () -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1195,7 +1105,6 @@ let (|P|) (expr2 : int) (expr1 : int) = P let expr2 = 2 match 1 with P expr2 pat1 pat2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1209,7 +1118,6 @@ let (|P|_|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then Some P else None let expr2 = 2 match 1 with P expr2 pat1 pat2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1223,7 +1131,6 @@ let (|P|_|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then ValueSome P else let expr2 = 2 match 1 with P expr2 pat1 pat2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1237,7 +1144,6 @@ let (|P|Q|) (expr2 : int) (expr1 : int) = if expr1 = expr2 then P else Q let expr2 = 2 match 1 with P expr2 pat1 pat2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1251,7 +1157,6 @@ let (|P|) expr2 expr1 = P (expr1 + expr2) let expr2 = 2 match 1 with P expr2 pat1 pat2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1265,7 +1170,6 @@ let (|P|_|) expr2 expr1 = if expr1 = expr2 then Some (P (expr1 + expr2)) else No let expr2 = 2 match 1 with P expr2 pat1 pat2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1279,7 +1183,6 @@ let (|P|_|) expr2 expr1 = if expr1 = expr2 then ValueSome (P (expr1 + expr2)) el let expr2 = 2 match 1 with P expr2 pat1 pat2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail @@ -1293,7 +1196,6 @@ let (|P|Q|) expr2 expr1 = if expr1 = expr2 then P (expr1 + expr2) else Q let expr2 = 2 match 1 with P expr2 pat1 pat2 -> () """ - |> withLangVersionPreview |> withNoWarn IncompletePatternMatches |> typecheck |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/Directives.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/Directives.fs index 2f1dda5d400e..95bd4e449331 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/Directives.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/Directives.fs @@ -7,7 +7,7 @@ open FSharp.Test.Compiler module HashDirectives = [] - [] + [] [] let ``#nowarn - errors`` (languageVersion) = @@ -27,9 +27,9 @@ module HashDirectives = |> withDiagnostics[ if languageVersion = "8.0" then (Warning 203, Line 6, Col 1, Line 6, Col 13, "Invalid warning number 'FS'") - (Error 3350, Line 3, Col 9, Line 3, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 4, Col 9, Line 4, Col 15, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 5, Col 9, Line 5, Col 13, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 3, Col 9, Line 3, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 4, Col 9, Line 4, Col 15, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 5, Col 9, Line 5, Col 13, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") else (Warning 203, Line 3, Col 1, Line 3, Col 11, "Invalid warning number 'FS'") (Warning 203, Line 6, Col 1, Line 6, Col 13, "Invalid warning number 'FS'") @@ -37,7 +37,7 @@ module HashDirectives = [] - [] + [] [] let ``#nowarn - errors - collected`` (languageVersion) = @@ -58,16 +58,16 @@ module HashDirectives = |> withDiagnostics[ if languageVersion = "8.0" then (Warning 203, Line 2, Col 1, Line 9, Col 11, "Invalid warning number 'FS'") - (Error 3350, Line 4, Col 5, Line 4, Col 7, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 5, Col 5, Line 5, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 6, Col 5, Line 6, Col 9, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 4, Col 5, Line 4, Col 7, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 5, Col 5, Line 5, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 6, Col 5, Line 6, Col 9, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") else (Warning 203, Line 2, Col 1, Line 9, Col 11, "Invalid warning number 'FS'") ] [] - [] + [] [] let ``#nowarn - errors - inline`` (languageVersion) = @@ -82,16 +82,16 @@ module HashDirectives = |> withDiagnostics [ if languageVersion = "8.0" then (Warning 203, Line 3, Col 1, Line 3, Col 44, "Invalid warning number 'FS'") - (Error 3350, Line 3, Col 9, Line 3, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 3, Col 12, Line 3, Col 18, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 3, Col 19, Line 3, Col 23, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 3, Col 9, Line 3, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 3, Col 12, Line 3, Col 18, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 3, Col 19, Line 3, Col 23, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") else (Warning 203, Line 3, Col 1, Line 3, Col 44, "Invalid warning number 'FS'") ] [] - [] + [] [] let ``#nowarn - realcode`` (langVersion) = @@ -126,8 +126,8 @@ module DoBinding = |> shouldFail |> withDiagnostics [ (Warning 1104, Line 5, Col 15, Line 5, Col 31, "Identifiers containing '@' are reserved for use in F# code generation") - (Error 3350, Line 2, Col 9, Line 2, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 2, Col 12, Line 2, Col 18, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 2, Col 9, Line 2, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 2, Col 12, Line 2, Col 18, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") ] else compileResult @@ -135,7 +135,7 @@ module DoBinding = [] - [] + [] [] let ``#time - mixed - Fsc`` (langversion) = @@ -161,14 +161,14 @@ printfn "Hello, World" |> shouldFail |> withDiagnostics [ if langversion = "8.0" then - (Error 3350, Line 2, Col 7, Line 2, Col 9, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 3, Col 7, Line 3, Col 10, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 4, Col 7, Line 4, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 5, Col 7, Line 5, Col 12, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 6, Col 7, Line 6, Col 17, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 7, Col 7, Line 7, Col 10, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 8, Col 7, Line 8, Col 9, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 8, Col 10, Line 8, Col 13, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 2, Col 7, Line 2, Col 9, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 3, Col 7, Line 3, Col 10, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 4, Col 7, Line 4, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 5, Col 7, Line 5, Col 12, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 6, Col 7, Line 6, Col 17, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 7, Col 7, Line 7, Col 10, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 8, Col 7, Line 8, Col 9, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 8, Col 10, Line 8, Col 13, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") (Error 235, Line 12, Col 1, Line 12, Col 13, """Invalid directive. Expected '#time', '#time "on"' or '#time "off"'.""") (Error 235, Line 13, Col 1, Line 13, Col 17, """Invalid directive. Expected '#time', '#time "on"' or '#time "off"'.""") else @@ -183,7 +183,7 @@ printfn "Hello, World" [] - [] + [] [] let ``#time - mixed - Fsx`` (langversion) = @@ -209,14 +209,14 @@ printfn "Hello, World" |> shouldFail |> withDiagnostics [ if langversion = "8.0" then - (Error 3350, Line 2, Col 7, Line 2, Col 9, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 3, Col 7, Line 3, Col 10, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 4, Col 7, Line 4, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 5, Col 7, Line 5, Col 12, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 6, Col 7, Line 6, Col 17, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 7, Col 7, Line 7, Col 10, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 8, Col 7, Line 8, Col 9, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 8, Col 10, Line 8, Col 13, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 2, Col 7, Line 2, Col 9, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 3, Col 7, Line 3, Col 10, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 4, Col 7, Line 4, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 5, Col 7, Line 5, Col 12, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 6, Col 7, Line 6, Col 17, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 7, Col 7, Line 7, Col 10, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 8, Col 7, Line 8, Col 9, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 8, Col 10, Line 8, Col 13, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") (Error 235, Line 12, Col 1, Line 12, Col 13, """Invalid directive. Expected '#time', '#time "on"' or '#time "off"'.""") (Error 235, Line 13, Col 1, Line 13, Col 17, """Invalid directive. Expected '#time', '#time "on"' or '#time "off"'.""") else diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/SuggestionsTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/SuggestionsTests.fs index 76bf2d3e88c5..ebdeeb3a20e4 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/SuggestionsTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/SuggestionsTests.fs @@ -77,7 +77,7 @@ let x = N.MyUnion.``My Case2`` |> typecheck |> shouldFail |> withSingleDiagnostic (Error 39, Line 9, Col 19, Line 9,Col 31, - ("The type 'MyUnion' does not define the field, constructor or member 'My Case2'. Maybe you want one of the following:" + Environment.NewLine + " Case2" + Environment.NewLine + " ``My Case1``")) + ("The type 'MyUnion' does not define the field, constructor or member 'My Case2'. Maybe you want one of the following:" + Environment.NewLine + " Case2" + Environment.NewLine + " ``My Case1``" + Environment.NewLine + " IsMy Case1")) [] @@ -224,7 +224,7 @@ let u = MyUnion.AntherCase |> typecheck |> shouldFail |> withSingleDiagnostic (Error 39, Line 6, Col 17, Line 6, Col 27, - ("The type 'MyUnion' does not define the field, constructor or member 'AntherCase'. Maybe you want one of the following:" + Environment.NewLine + " AnotherCase")) + ("The type 'MyUnion' does not define the field, constructor or member 'AntherCase'. Maybe you want one of the following:" + Environment.NewLine + " AnotherCase" + Environment.NewLine + " IsAnotherCase")) [] let ``Suggest Union Type for RequireQualifiedAccess Unions`` () = diff --git a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs index 6912abca3327..4b0163a9f4b7 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs +++ b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs @@ -165,7 +165,7 @@ let GetAllUsesOfAllSymbols() = traceProvider.ForceFlush() |> ignore traceProvider.Dispose() - if result.Length <> 79 then failwith $"Expected 79 symbolUses, got {result.Length}:\n%A{result}" + if result.Length <> 79 then failwith $"Expected 81 symbolUses, got {result.Length}:\n%A{result}" [] let ``We don't lose subsequent diagnostics when there's error in one file`` () = diff --git a/tests/FSharp.Compiler.ComponentTests/Language/BooleanReturningAndReturnTypeDirectedPartialActivePatternTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/BooleanReturningAndReturnTypeDirectedPartialActivePatternTests.fs index c8ba6fba8567..977ac343af39 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/BooleanReturningAndReturnTypeDirectedPartialActivePatternTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/BooleanReturningAndReturnTypeDirectedPartialActivePatternTests.fs @@ -30,7 +30,6 @@ let ``Single case active pattern returning bool should success`` () = let (|IsA|) x = x = "A" let (IsA r) = "A" """ - |> withLangVersionPreview |> typecheck |> shouldSucceed @@ -54,7 +53,6 @@ match "x" with | EqualTo "x" -> () | _ -> fail "with argument" """ - |> withLangVersionPreview |> runCode |> shouldSucceed @@ -69,8 +67,8 @@ let (|OddVOption|_|) x = if x % 2 = 1 then ValueSome() else ValueNone |> typecheck |> shouldFail |> withDiagnostics [ - (Error 3350, Line 1, Col 5, Line 1, Col 20, "Feature 'Boolean-returning and return-type-directed partial active patterns' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") - (Error 3350, Line 2, Col 5, Line 2, Col 23, "Feature 'Boolean-returning and return-type-directed partial active patterns' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 1, Col 5, Line 1, Col 20, "Feature 'Boolean-returning and return-type-directed partial active patterns' is not available in F# 8.0. Please use language version 9.0 or greater.") + (Error 3350, Line 2, Col 5, Line 2, Col 23, "Feature 'Boolean-returning and return-type-directed partial active patterns' is not available in F# 8.0. Please use language version 9.0 or greater.") ] [] @@ -90,7 +88,6 @@ match "A" with | IsA "to match return value" -> "Matched" | _ -> "not Matched" """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withDiagnostics [ diff --git a/tests/FSharp.Compiler.ComponentTests/Language/CopyAndUpdateTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/CopyAndUpdateTests.fs index 118fb0fb81fa..8972cfe0339e 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/CopyAndUpdateTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/CopyAndUpdateTests.fs @@ -29,7 +29,6 @@ type RecTy = { D: NestdRecTy; E: string option } let t2 x = { x with D.B = "a"; D.B = "b"; D.B = "c" } """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withDiagnostics [ @@ -46,7 +45,6 @@ type RecTy = { D: NestdRecTy; E: string option } let t2 x = { x with D.B = "a"; D.C = ""; D.B = "c" ; D.C = "d" } """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withDiagnostics [ diff --git a/tests/FSharp.Compiler.ComponentTests/Language/DiscriminatedUnionTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/DiscriminatedUnionTests.fs index 0daad0e2f284..fe2963643f34 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/DiscriminatedUnionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/DiscriminatedUnionTests.fs @@ -15,7 +15,6 @@ let foo = Foo.Foo "hi" if not foo.IsFoo then failwith "Should be Foo" if foo.IsBar then failwith "Should not be Bar" """ - |> withLangVersionPreview |> compileExeAndRun |> shouldSucceed @@ -27,7 +26,6 @@ let foo = Foo.Bar "hi" if not foo.IsBar then failwith "Should be Bar" """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withDiagnostics [Error 39, Line 4, Col 12, Line 4, Col 17, "The type 'Foo' does not define the field, constructor or member 'IsBar'. Maybe you want one of the following: @@ -45,7 +43,6 @@ let inline test<'a when 'a: (member IsA: bool)> (v: 'a) = X.A "a" |> test """ - |> withLangVersionPreview |> compileExeAndRun |> shouldSucceed @@ -61,7 +58,6 @@ let foo = X.a 1 if not foo.Isa then failwith "Should be a" if foo.IsA then failwith "Should not be A" """ - |> withLangVersionPreview |> compileExeAndRun |> shouldSucceed @@ -78,7 +74,6 @@ let marsbar = ``Mars Bar`` if marsbar.IsFoo then failwith "Should not be Foo" if not marsbar.``IsMars Bar`` then failwith "Should be ``Mars Bar``" """ - |> withLangVersionPreview |> compileExeAndRun |> shouldSucceed @@ -100,7 +95,6 @@ type Foo = | Foo of string | Bar """ - |> withLangVersionPreview |> compileExeAndRun |> shouldSucceed @@ -129,7 +123,6 @@ module Main = if isBar then failwith "Should not be Bar" 0 """ - |> withLangVersionPreview |> compileExeAndRun |> shouldSucceed @@ -141,7 +134,6 @@ type Foo = | Foo of string | Bar let foo = Foo.Foo "hi" let isFoo = foo.IsFoo """ - |> withLangVersionPreview |> typecheck |> shouldFail |> withErrorMessage "The type 'Foo' does not define the field, constructor or member 'IsFoo'. Maybe you want one of the following: @@ -177,7 +169,6 @@ type PrimaryAssembly = let x = (PrimaryAssembly.Mscorlib).IsMscorlib """ - |> withLangVersionPreview |> compileExeAndRun |> shouldSucceed @@ -194,6 +185,5 @@ let giveMeZ () = Z if giveMeZ().IsX then failwith "Should not be X" """ - |> withLangVersionPreview |> compileExeAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Language/InterpolatedStringsTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/InterpolatedStringsTests.fs index 856c5d46d3c3..b4e2cc8eab93 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/InterpolatedStringsTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/InterpolatedStringsTests.fs @@ -140,7 +140,6 @@ type Foo () = let x = {strToPrint} printfn "%%s" x """ - |> withLangVersionPreview |> compileExeAndRun |> shouldSucceed |> withStdOutContains "abcde" @@ -151,7 +150,6 @@ printfn "%%s" x let x = {strToPrint} printfn "%%s" x """ - |> withLangVersionPreview |> compileExeAndRun |> shouldSucceed |> withStdOutContains """a @@ -170,7 +168,6 @@ let x = {formattableStr} : System.FormattableString assert(x.ArgumentCount = {argCount}) printfn "%%s" (System.Globalization.CultureInfo "en-US" |> x.ToString) """ - |> withLangVersionPreview |> compileExeAndRun |> shouldSucceed |> withStdOutContains "abcde" \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableCsharpImportTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableCsharpImportTests.fs index c477417e75aa..24ff5798cbd2 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableCsharpImportTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableCsharpImportTests.fs @@ -6,7 +6,6 @@ open FSharp.Test.Compiler let withStrictNullness cu = cu - |> withLangVersionPreview |> withCheckNulls |> withWarnOn 3261 |> withOptions ["--warnaserror+"] diff --git a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableLibraryConstructsTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableLibraryConstructsTests.fs index 790c4cfd395b..e9542620f7ae 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableLibraryConstructsTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableLibraryConstructsTests.fs @@ -6,7 +6,6 @@ open FSharp.Test.Compiler let typeCheckWithStrictNullness cu = cu - |> withLangVersionPreview |> withCheckNulls |> withWarnOn 3261 |> withOptions ["--warnaserror+"] diff --git a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs index ffc875d90151..c355a6a244fe 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs @@ -5,7 +5,6 @@ open FSharp.Test.Compiler let withNullnessOptions cu = cu - |> withLangVersionPreview |> withCheckNulls |> withWarnOn 3261 |> withWarnOn 3262 diff --git a/tests/FSharp.Compiler.ComponentTests/Miscellaneous/FsharpSuiteMigrated.fs b/tests/FSharp.Compiler.ComponentTests/Miscellaneous/FsharpSuiteMigrated.fs index 868136e3205d..2490e301e053 100644 --- a/tests/FSharp.Compiler.ComponentTests/Miscellaneous/FsharpSuiteMigrated.fs +++ b/tests/FSharp.Compiler.ComponentTests/Miscellaneous/FsharpSuiteMigrated.fs @@ -80,6 +80,7 @@ module TestFrameworkAdapter = | LangVersion.V60 -> "6.0",bonusArgs | LangVersion.V70 -> "7.0",bonusArgs | LangVersion.V80 -> "8.0",bonusArgs + | LangVersion.V90 -> "9.0",bonusArgs | LangVersion.Preview -> "preview",bonusArgs | LangVersion.Latest -> "latest", bonusArgs | LangVersion.SupportsMl -> "5.0", "--mlcompatibility" :: bonusArgs diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/GraphProcessingTests.fs b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/GraphProcessingTests.fs index 3e5483b0a7f2..f8a4c8d2d235 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/GraphProcessingTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/GraphProcessingTests.fs @@ -10,7 +10,7 @@ let ``When processing a node throws an exception, an exception is raised with th let work (_processor : int -> ProcessedNode) (_node : NodeInfo) : string = failwith "Work exception" let exn = - Assert.Throws( + Assert.Throws( fun () -> processGraph graph diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/PropertyShadowingTests.fs b/tests/FSharp.Compiler.ComponentTests/TypeChecks/PropertyShadowingTests.fs index f74a6c951b7f..c7cbece80e8d 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/PropertyShadowingTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/PropertyShadowingTests.fs @@ -24,7 +24,6 @@ module PropertyShadowingTests = compilation |> asFsx |> withNoDebug - |> withOptions ["--langversion:preview"] |> withRealInternalSignatureOff |> verifyBaselines |> compileAndRun @@ -47,7 +46,6 @@ module PropertyShadowingTests = compilation |> asFsx |> withNoDebug - |> withOptions ["--langversion:preview"] |> withRealInternalSignatureOn |> verifyBaselines |> compileAndRun @@ -91,7 +89,6 @@ module PropertyShadowingTests = compilation |> asFsx |> withNoDebug - |> withOptions ["--langversion:preview"] |> verifyBaselines |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowingTests.fs b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowingTests.fs index eefb9cf7a988..bd0ba065ff80 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowingTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowingTests.fs @@ -20,7 +20,6 @@ let [] folder = __SOURCE_DIRECTORY__ + "/Shadowing" let PropertyHidding compilation = compilation |> asFsx - |> withOptions ["--langversion:preview"] |> verifyBaselines |> compileAndRun |> shouldSucceed @@ -60,7 +59,6 @@ let ``PropertyHiding v7.0`` compilation = let ``PropertyHiding fails`` compilation = compilation |> asFsx - |> withOptions ["--langversion:preview"] |> verifyBaselines |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs index 0e8175d950d1..abdbf8cf6e0e 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs @@ -289,7 +289,7 @@ let details = result.RunDetails printfn ""%A"" result 123 " - use script = new FSharpScript(additionalArgs=[|"/langversion:preview"|]) + use script = new FSharpScript(additionalArgs=[| |]) let opt = script.Eval(code) |> getValue let value = opt.Value Assert.Equal(123, value.ReflectionValue :?> int32) @@ -297,7 +297,7 @@ printfn ""%A"" result [] member _.``Eval script with package manager invalid key``() = - use script = new FSharpScript(additionalArgs=[|"/langversion:preview"|]) + use script = new FSharpScript(additionalArgs=[| |]) let result, _errors = script.Eval(@"#r ""nugt:FSharp.Data""") match result with | Ok(_) -> Assert.False(true, "expected a failure") @@ -306,7 +306,7 @@ printfn ""%A"" result [] member _.``Eval script with invalid PackageName should fail immediately``() = use output = new RedirectConsoleOutput() - use script = new FSharpScript(additionalArgs=[|"/langversion:preview"|]) + use script = new FSharpScript(additionalArgs=[| |]) let mutable found = 0 let outp = System.Collections.Generic.List() output.OutputProduced.Add( @@ -322,7 +322,7 @@ printfn ""%A"" result [] member _.``Eval script with invalid PackageName should fail immediately and resolve one time only``() = use output = new RedirectConsoleOutput() - use script = new FSharpScript(additionalArgs=[|"/langversion:preview"|]) + use script = new FSharpScript(additionalArgs=[| |]) let mutable foundResolve = 0 output.OutputProduced.Add (fun line -> if line.Contains("error NU1101:") then foundResolve <- foundResolve + 1) let result, errors = @@ -347,7 +347,7 @@ let inputValues = [| 12.0; 10.0; 17.0; 5.0 |] let tInput = new DenseTensor(inputValues.AsMemory(), new ReadOnlySpan([|4|])) tInput.Length """ - use script = new FSharpScript(additionalArgs=[|"/langversion:preview"|]) + use script = new FSharpScript(additionalArgs=[| |]) let opt = script.Eval(code) |> getValue let value = opt.Value Assert.Equal(4L, downcast value.ReflectionValue) @@ -358,7 +358,7 @@ tInput.Length #r "nuget:System.Device.Gpio, 1.0.0" typeof.Assembly.Location """ - use script = new FSharpScript(additionalArgs=[|"/langversion:preview"|]) + use script = new FSharpScript(additionalArgs=[| |]) let opt = script.Eval(code) |> getValue let value = opt.Value @@ -390,7 +390,7 @@ else printfn ""Current process: %d"" (Imports.getpid()) 123 " - use script = new FSharpScript(additionalArgs=[|"/langversion:preview"|]) + use script = new FSharpScript(additionalArgs=[| |]) let opt = script.Eval(code) |> getValue let value = opt.Value Assert.Equal(123, value.ReflectionValue :?> int32) @@ -482,7 +482,7 @@ let test p str = false test pfloat "1.234" """ - use script = new FSharpScript(additionalArgs=[|"/langversion:preview"|]) + use script = new FSharpScript(additionalArgs=[| |]) let opt = script.Eval(code) |> getValue let value = opt.Value Assert.True(true = downcast value.ReflectionValue) diff --git a/tests/FSharp.Compiler.Service.Tests/AssemblyContentProviderTests.fs b/tests/FSharp.Compiler.Service.Tests/AssemblyContentProviderTests.fs index c237c94e0247..cb4521b7af4a 100644 --- a/tests/FSharp.Compiler.Service.Tests/AssemblyContentProviderTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/AssemblyContentProviderTests.fs @@ -202,6 +202,7 @@ module Test = "1 2 3.Test.M1.A.B", "open ``1 2 3`` - Test.M1.A.B"; "1 2 3.Test.M1.A.C", "open ``1 2 3`` - Test.M1.A.C"; "1 2 3.Test.M1.A.op_PlusPlus", "open ``1 2 3`` - Test.M1.A.op_PlusPlus"; + "1 2 3.Test.M1.(|Is1|_|)", "open ``1 2 3`` - Test.M1.``(|Is1|_|)``" "1 2 3.Test.M1.B", "open ``1 2 3`` - Test.M1.B"; "1 2 3.Test.M1.E", "open ``1 2 3`` - Test.M1.E"; "1 2 3.Test.M1.F", "open ``1 2 3`` - Test.M1.F"; diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl index cccdc677da38..8b927e774405 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl @@ -126,6 +126,9 @@ Microsoft.FSharp.Collections.ArrayModule: T MaxBy[T,TResult](Microsoft.FSharp.Co Microsoft.FSharp.Collections.ArrayModule: T Max[T](T[]) Microsoft.FSharp.Collections.ArrayModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[]) Microsoft.FSharp.Collections.ArrayModule: T Min[T](T[]) +Microsoft.FSharp.Collections.ArrayModule: T RandomChoiceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], T[]) +Microsoft.FSharp.Collections.ArrayModule: T RandomChoiceWith[T](System.Random, T[]) +Microsoft.FSharp.Collections.ArrayModule: T RandomChoice[T](T[]) Microsoft.FSharp.Collections.ArrayModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) Microsoft.FSharp.Collections.ArrayModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) Microsoft.FSharp.Collections.ArrayModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) @@ -164,6 +167,15 @@ Microsoft.FSharp.Collections.ArrayModule: T[] InsertManyAt[T](Int32, System.Coll Microsoft.FSharp.Collections.ArrayModule: T[] OfList[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ArrayModule: T[] OfSeq[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.ArrayModule: T[] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomChoicesBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomChoicesWith[T](System.Random, Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomChoices[T](Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomSampleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomSampleWith[T](System.Random, Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomSample[T](Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomShuffleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomShuffleWith[T](System.Random, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomShuffle[T](T[]) Microsoft.FSharp.Collections.ArrayModule: T[] RemoveAt[T](Int32, T[]) Microsoft.FSharp.Collections.ArrayModule: T[] RemoveManyAt[T](Int32, Int32, T[]) Microsoft.FSharp.Collections.ArrayModule: T[] Replicate[T](Int32, T) @@ -194,6 +206,9 @@ Microsoft.FSharp.Collections.ArrayModule: Void Iterate2[T1,T2](Microsoft.FSharp. Microsoft.FSharp.Collections.ArrayModule: Void IterateIndexed2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.Unit]]], T1[], T2[]) Microsoft.FSharp.Collections.ArrayModule: Void IterateIndexed[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit]], T[]) Microsoft.FSharp.Collections.ArrayModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], T[]) +Microsoft.FSharp.Collections.ArrayModule: Void RandomShuffleInPlaceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], T[]) +Microsoft.FSharp.Collections.ArrayModule: Void RandomShuffleInPlaceWith[T](System.Random, T[]) +Microsoft.FSharp.Collections.ArrayModule: Void RandomShuffleInPlace[T](T[]) Microsoft.FSharp.Collections.ArrayModule: Void Set[T](T[], Int32, T) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[]) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceWith[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]], T[]) @@ -329,6 +344,15 @@ Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] OfArray[T](T[]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] OfSeq[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomChoicesBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomChoicesWith[T](System.Random, Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomChoices[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomSampleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomSampleWith[T](System.Random, Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomSample[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomShuffleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomShuffleWith[T](System.Random, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomShuffle[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RemoveAt[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RemoveManyAt[T](Int32, Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Replicate[T](Int32, T) @@ -377,6 +401,9 @@ Microsoft.FSharp.Collections.ListModule: T MaxBy[T,TResult](Microsoft.FSharp.Cor Microsoft.FSharp.Collections.ListModule: T Max[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T Min[T](Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: T RandomChoiceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: T RandomChoiceWith[T](System.Random, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: T RandomChoice[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) @@ -483,6 +510,15 @@ Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1 Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] OfArray[T](T[]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] OfList[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomChoicesBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomChoicesWith[T](System.Random, Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomChoices[T](Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomSampleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomSampleWith[T](System.Random, Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomSample[T](Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomShuffleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomShuffleWith[T](System.Random, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomShuffle[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] ReadOnly[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RemoveAt[T](Int32, System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RemoveManyAt[T](Int32, Int32, System.Collections.Generic.IEnumerable`1[T]) @@ -518,6 +554,9 @@ Microsoft.FSharp.Collections.SeqModule: T MaxBy[T,TResult](Microsoft.FSharp.Core Microsoft.FSharp.Collections.SeqModule: T Max[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T Min[T](System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: T RandomChoiceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: T RandomChoiceWith[T](System.Random, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: T RandomChoice[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) @@ -1978,8 +2017,10 @@ Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] Filt Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] Flatten[T](Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpOption`1[T]]) Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OfNullable[T](System.Nullable`1[T]) Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OfObj[T](T) +Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OfValueOption[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OrElseWith[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.FSharpOption`1[T]], Microsoft.FSharp.Core.FSharpOption`1[T]) Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OrElse[T](Microsoft.FSharp.Core.FSharpOption`1[T], Microsoft.FSharp.Core.FSharpOption`1[T]) +Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpValueOption`1[T] ToValueOption[T](Microsoft.FSharp.Core.FSharpOption`1[T]) Microsoft.FSharp.Core.OptionModule: System.Nullable`1[T] ToNullable[T](Microsoft.FSharp.Core.FSharpOption`1[T]) Microsoft.FSharp.Core.OptionModule: T DefaultValue[T](T, Microsoft.FSharp.Core.FSharpOption`1[T]) Microsoft.FSharp.Core.OptionModule: T DefaultWith[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpOption`1[T]) @@ -2086,6 +2127,7 @@ Microsoft.FSharp.Core.ValueOption: Boolean IsNone[T](Microsoft.FSharp.Core.FShar Microsoft.FSharp.Core.ValueOption: Boolean IsSome[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.ValueOption: Int32 Count[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Collections.FSharpList`1[T] ToList[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) +Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpOption`1[T] ToOption[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[TResult] Bind[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpValueOption`1[TResult]], Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[TResult] Map2[T1,T2,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]], Microsoft.FSharp.Core.FSharpValueOption`1[T1], Microsoft.FSharp.Core.FSharpValueOption`1[T2]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[TResult] Map3[T1,T2,T3,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]], Microsoft.FSharp.Core.FSharpValueOption`1[T1], Microsoft.FSharp.Core.FSharpValueOption`1[T2], Microsoft.FSharp.Core.FSharpValueOption`1[T3]) @@ -2094,6 +2136,7 @@ Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] Flatten[T](Microsoft.FSharp.Core.FSharpValueOption`1[Microsoft.FSharp.Core.FSharpValueOption`1[T]]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OfNullable[T](System.Nullable`1[T]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OfObj[T](T) +Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OfOption[T](Microsoft.FSharp.Core.FSharpOption`1[T]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OrElseWith[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.FSharpValueOption`1[T]], Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OrElse[T](Microsoft.FSharp.Core.FSharpValueOption`1[T], Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.ValueOption: System.Nullable`1[T] ToNullable[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl index 902d117b840c..a49aac19aaa0 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl @@ -126,6 +126,9 @@ Microsoft.FSharp.Collections.ArrayModule: T MaxBy[T,TResult](Microsoft.FSharp.Co Microsoft.FSharp.Collections.ArrayModule: T Max[T](T[]) Microsoft.FSharp.Collections.ArrayModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[]) Microsoft.FSharp.Collections.ArrayModule: T Min[T](T[]) +Microsoft.FSharp.Collections.ArrayModule: T RandomChoiceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], T[]) +Microsoft.FSharp.Collections.ArrayModule: T RandomChoiceWith[T](System.Random, T[]) +Microsoft.FSharp.Collections.ArrayModule: T RandomChoice[T](T[]) Microsoft.FSharp.Collections.ArrayModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) Microsoft.FSharp.Collections.ArrayModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) Microsoft.FSharp.Collections.ArrayModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) @@ -164,6 +167,15 @@ Microsoft.FSharp.Collections.ArrayModule: T[] InsertManyAt[T](Int32, System.Coll Microsoft.FSharp.Collections.ArrayModule: T[] OfList[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ArrayModule: T[] OfSeq[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.ArrayModule: T[] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomChoicesBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomChoicesWith[T](System.Random, Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomChoices[T](Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomSampleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomSampleWith[T](System.Random, Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomSample[T](Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomShuffleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomShuffleWith[T](System.Random, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomShuffle[T](T[]) Microsoft.FSharp.Collections.ArrayModule: T[] RemoveAt[T](Int32, T[]) Microsoft.FSharp.Collections.ArrayModule: T[] RemoveManyAt[T](Int32, Int32, T[]) Microsoft.FSharp.Collections.ArrayModule: T[] Replicate[T](Int32, T) @@ -194,6 +206,9 @@ Microsoft.FSharp.Collections.ArrayModule: Void Iterate2[T1,T2](Microsoft.FSharp. Microsoft.FSharp.Collections.ArrayModule: Void IterateIndexed2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.Unit]]], T1[], T2[]) Microsoft.FSharp.Collections.ArrayModule: Void IterateIndexed[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit]], T[]) Microsoft.FSharp.Collections.ArrayModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], T[]) +Microsoft.FSharp.Collections.ArrayModule: Void RandomShuffleInPlaceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], T[]) +Microsoft.FSharp.Collections.ArrayModule: Void RandomShuffleInPlaceWith[T](System.Random, T[]) +Microsoft.FSharp.Collections.ArrayModule: Void RandomShuffleInPlace[T](T[]) Microsoft.FSharp.Collections.ArrayModule: Void Set[T](T[], Int32, T) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[]) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceWith[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]], T[]) @@ -202,6 +217,7 @@ Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.ICom Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] NonStructural$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]]) Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] NonStructural[T]() Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] Structural[T]() +Microsoft.FSharp.Collections.FSharpList: Microsoft.FSharp.Collections.FSharpList`1[T] Create[T](System.ReadOnlySpan`1[T]) Microsoft.FSharp.Collections.FSharpList`1+Tags[T]: Int32 Cons Microsoft.FSharp.Collections.FSharpList`1+Tags[T]: Int32 Empty Microsoft.FSharp.Collections.FSharpList`1[T]: Boolean Equals(Microsoft.FSharp.Collections.FSharpList`1[T]) @@ -259,6 +275,7 @@ Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: System.String ToString() Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: TValue Item [TKey] Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: TValue get_Item(TKey) Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Void .ctor(System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) +Microsoft.FSharp.Collections.FSharpSet: Microsoft.FSharp.Collections.FSharpSet`1[T] Create[T](System.ReadOnlySpan`1[T]) Microsoft.FSharp.Collections.FSharpSet`1[T]: Boolean Contains(T) Microsoft.FSharp.Collections.FSharpSet`1[T]: Boolean Equals(System.Object) Microsoft.FSharp.Collections.FSharpSet`1[T]: Boolean IsEmpty @@ -329,6 +346,15 @@ Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] OfArray[T](T[]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] OfSeq[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomChoicesBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomChoicesWith[T](System.Random, Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomChoices[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomSampleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomSampleWith[T](System.Random, Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomSample[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomShuffleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomShuffleWith[T](System.Random, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomShuffle[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RemoveAt[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RemoveManyAt[T](Int32, Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Replicate[T](Int32, T) @@ -377,6 +403,9 @@ Microsoft.FSharp.Collections.ListModule: T MaxBy[T,TResult](Microsoft.FSharp.Cor Microsoft.FSharp.Collections.ListModule: T Max[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T Min[T](Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: T RandomChoiceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: T RandomChoiceWith[T](System.Random, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: T RandomChoice[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) @@ -483,6 +512,15 @@ Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1 Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] OfArray[T](T[]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] OfList[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomChoicesBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomChoicesWith[T](System.Random, Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomChoices[T](Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomSampleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomSampleWith[T](System.Random, Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomSample[T](Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomShuffleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomShuffleWith[T](System.Random, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomShuffle[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] ReadOnly[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RemoveAt[T](Int32, System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RemoveManyAt[T](Int32, Int32, System.Collections.Generic.IEnumerable`1[T]) @@ -518,6 +556,9 @@ Microsoft.FSharp.Collections.SeqModule: T MaxBy[T,TResult](Microsoft.FSharp.Core Microsoft.FSharp.Collections.SeqModule: T Max[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T Min[T](System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: T RandomChoiceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: T RandomChoiceWith[T](System.Random, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: T RandomChoice[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) @@ -1979,8 +2020,10 @@ Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] Filt Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] Flatten[T](Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpOption`1[T]]) Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OfNullable[T](System.Nullable`1[T]) Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OfObj[T](T) +Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OfValueOption[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OrElseWith[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.FSharpOption`1[T]], Microsoft.FSharp.Core.FSharpOption`1[T]) Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OrElse[T](Microsoft.FSharp.Core.FSharpOption`1[T], Microsoft.FSharp.Core.FSharpOption`1[T]) +Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpValueOption`1[T] ToValueOption[T](Microsoft.FSharp.Core.FSharpOption`1[T]) Microsoft.FSharp.Core.OptionModule: System.Nullable`1[T] ToNullable[T](Microsoft.FSharp.Core.FSharpOption`1[T]) Microsoft.FSharp.Core.OptionModule: T DefaultValue[T](T, Microsoft.FSharp.Core.FSharpOption`1[T]) Microsoft.FSharp.Core.OptionModule: T DefaultWith[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpOption`1[T]) @@ -2087,6 +2130,7 @@ Microsoft.FSharp.Core.ValueOption: Boolean IsNone[T](Microsoft.FSharp.Core.FShar Microsoft.FSharp.Core.ValueOption: Boolean IsSome[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.ValueOption: Int32 Count[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Collections.FSharpList`1[T] ToList[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) +Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpOption`1[T] ToOption[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[TResult] Bind[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpValueOption`1[TResult]], Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[TResult] Map2[T1,T2,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]], Microsoft.FSharp.Core.FSharpValueOption`1[T1], Microsoft.FSharp.Core.FSharpValueOption`1[T2]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[TResult] Map3[T1,T2,T3,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]], Microsoft.FSharp.Core.FSharpValueOption`1[T1], Microsoft.FSharp.Core.FSharpValueOption`1[T2], Microsoft.FSharp.Core.FSharpValueOption`1[T3]) @@ -2095,6 +2139,7 @@ Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] Flatten[T](Microsoft.FSharp.Core.FSharpValueOption`1[Microsoft.FSharp.Core.FSharpValueOption`1[T]]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OfNullable[T](System.Nullable`1[T]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OfObj[T](T) +Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OfOption[T](Microsoft.FSharp.Core.FSharpOption`1[T]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OrElseWith[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.FSharpValueOption`1[T]], Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OrElse[T](Microsoft.FSharp.Core.FSharpValueOption`1[T], Microsoft.FSharp.Core.FSharpValueOption`1[T]) Microsoft.FSharp.Core.ValueOption: System.Nullable`1[T] ToNullable[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index 1edd5ef54888..60378c63bfdd 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -510,6 +510,9 @@ module rec Compiler = let withLangVersion80 (cUnit: CompilationUnit) : CompilationUnit = withOptionsHelper [ "--langversion:8.0" ] "withLangVersion80 is only supported on F#" cUnit + let withLangVersion90 (cUnit: CompilationUnit) : CompilationUnit = + withOptionsHelper [ "--langversion:9.0" ] "withLangVersion90 is only supported on F#" cUnit + let withLangVersionPreview (cUnit: CompilationUnit) : CompilationUnit = withOptionsHelper [ "--langversion:preview" ] "withLangVersionPreview is only supported on F#" cUnit diff --git a/tests/FSharp.Test.Utilities/ScriptHelpers.fs b/tests/FSharp.Test.Utilities/ScriptHelpers.fs index 204168f5df22..aaaf5c458d8d 100644 --- a/tests/FSharp.Test.Utilities/ScriptHelpers.fs +++ b/tests/FSharp.Test.Utilities/ScriptHelpers.fs @@ -20,6 +20,7 @@ type LangVersion = | V60 | V70 | V80 + | V90 | Preview | Latest | SupportsMl @@ -48,6 +49,7 @@ type FSharpScript(?additionalArgs: string[], ?quiet: bool, ?langVersion: LangVer | LangVersion.V60 -> "--langversion:6.0" | LangVersion.V70 -> "--langversion:7.0" | LangVersion.V80 -> "--langversion:8.0" + | LangVersion.V90 -> "--langversion:9.0" |] let argv = Array.append baseArgs additionalArgs diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs index 184dc71facc0..010a2404b1d6 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs @@ -224,70 +224,56 @@ let ListExpressionSteppingTest5 () = """, (fun verifier -> verifier.VerifyIL [ """ -.method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - ListExpressionSteppingTest5() cil managed - { - - .maxstack 5 +.class public abstract auto ansi sealed ComputedListExpression05 + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest5() cil managed + { + + .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) - IL_0000: nop - IL_0001: ldc.i4.1 - IL_0002: ldc.i4.1 - IL_0003: ldc.i4.4 - IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_0009: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_000e: stloc.1 - .try - { - IL_000f: br.s IL_0031 - - IL_0011: ldloc.1 - IL_0012: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0017: stloc.3 - IL_0018: ldstr "hello" - IL_001d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0022: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0027: pop - IL_0028: ldloca.s V_0 - IL_002a: ldloc.3 - IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0030: nop - IL_0031: ldloc.1 - IL_0032: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0037: brtrue.s IL_0011 + uint64 V_1, + int32 V_2, + int32 V_3) + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.1 + IL_0004: stloc.2 + IL_0005: br.s IL_002b - IL_0039: ldnull - IL_003a: stloc.2 - IL_003b: leave.s IL_0052 + IL_0007: ldloca.s V_0 + IL_0009: ldloc.2 + IL_000a: stloc.3 + IL_000b: ldstr "hello" + IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0015: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001a: pop + IL_001b: ldloc.3 + IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0021: nop + IL_0022: ldloc.2 + IL_0023: ldc.i4.1 + IL_0024: add + IL_0025: stloc.2 + IL_0026: ldloc.1 + IL_0027: ldc.i4.1 + IL_0028: conv.i8 + IL_0029: add + IL_002a: stloc.1 + IL_002b: ldloc.1 + IL_002c: ldc.i4.4 + IL_002d: conv.i8 + IL_002e: blt.un.s IL_0007 - } - finally - { - IL_003d: ldloc.1 - IL_003e: isinst [runtime]System.IDisposable - IL_0043: stloc.s V_4 - IL_0045: ldloc.s V_4 - IL_0047: brfalse.s IL_0051 + IL_0030: ldloca.s V_0 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0037: ret + } - IL_0049: ldloc.s V_4 - IL_004b: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0050: endfinally - IL_0051: endfinally - } - IL_0052: ldloc.2 - IL_0053: pop - IL_0054: ldloca.s V_0 - IL_0056: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005b: ret } - """ - ])) +"""])) [] let ``ComputedListExpression06``() = diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticLinkTests.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticLinkTests.fs index 2349afe4fd64..b18f47eae1d6 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticLinkTests.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticLinkTests.fs @@ -105,7 +105,7 @@ type C() = [] static member F x = (C(), System.DateTime.Now) """ - Compilation.Create(source, Library, options = [|"--langversion:preview"|]) + Compilation.Create(source, Library, options = [| |]) let module2 = let source = diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs index e6e70b9096f1..672e10c25cb8 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs @@ -29,7 +29,7 @@ module TaskGeneratedCode = [] let ``check MoveNext of simple task debug``() = CompilerAssert.CompileLibraryAndVerifyILWithOptions( - [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |], + [| "/optimize-"; "/debug:portable"; "/tailcalls-" |], """ module Test @@ -116,7 +116,7 @@ let testTask() = task { return 1 } [] let ``check MoveNext of simple task optimized``() = CompilerAssert.CompileLibraryAndVerifyILWithOptions( - [| "/langversion:preview";"/optimize+";"/debug:portable";"/tailcalls+" |], + [| "/optimize+"; "/debug:portable"; "/tailcalls+" |], """ module Test @@ -190,7 +190,7 @@ let testTask() = task { return 1 } [] let ``check MoveNext of simple binding task debug``() = CompilerAssert.CompileLibraryAndVerifyILWithOptions( - [| "/langversion:preview"; "/debug:portable"; "/optimize-"; "/tailcalls-" |], + [| "/debug:portable"; "/optimize-"; "/tailcalls-" |], """ module Test open System.Threading.Tasks @@ -370,7 +370,7 @@ module TaskTryFinallyGeneration = [] let ``check MoveNext of task try/finally optimized``() = CompilerAssert.CompileLibraryAndVerifyILWithOptions( - [| "/langversion:preview";"/optimize+";"/debug:portable";"/tailcalls+" |], + [| "/optimize+"; "/debug:portable"; "/tailcalls+" |], """ module Test @@ -479,7 +479,7 @@ let testTask() = task { try 1+1 finally System.Console.WriteLine("finally") } [] let ``check MoveNext of task try/finally debug``() = CompilerAssert.CompileLibraryAndVerifyILWithOptions( - [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |], + [| "/optimize-"; "/debug:portable"; "/tailcalls-" |], """ module Test @@ -596,7 +596,7 @@ module TaskTryWithGeneration = [] let ``check MoveNext of task try/with optimized``() = CompilerAssert.CompileLibraryAndVerifyILWithOptions( - [| "/langversion:preview";"/optimize+";"/debug:portable";"/tailcalls+" |], + [| "/optimize+"; "/debug:portable"; "/tailcalls+" |], """ module Test @@ -709,7 +709,7 @@ let testTask() = task { try 1 with e -> System.Console.WriteLine("finally"); 2 } [] let ``check MoveNext of task try/with debug``() = CompilerAssert.CompileLibraryAndVerifyILWithOptions( - [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |], + [| "/optimize-"; "/debug:portable"; "/tailcalls-" |], """ module Test @@ -829,7 +829,7 @@ module TaskWhileLoopGeneration = [] let ``check MoveNext of task while loop optimized``() = CompilerAssert.CompileLibraryAndVerifyILWithOptions( - [| "/langversion:preview";"/optimize+";"/debug:portable";"/tailcalls+" |], + [| "/optimize+"; "/debug:portable"; "/tailcalls+" |], """ module Test @@ -927,7 +927,7 @@ let testTask() = task { while x > 4 do System.Console.WriteLine("loop") } [] let ``check MoveNext of task while loop debug``() = CompilerAssert.CompileLibraryAndVerifyILWithOptions( - [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |], + [| "/optimize-"; "/debug:portable"; "/tailcalls-" |], """ module Test @@ -1030,7 +1030,7 @@ module TaskTypeInference = [] let ``check initially ambiguous SRTP task code ``() = CompilerAssert.CompileExeAndRunWithOptions( - [| "/langversion:preview"; "/optimize-"; "/debug:portable";"/tailcalls-" |], + [| "/optimize-"; "/debug:portable"; "/tailcalls-" |], """ module Test @@ -1050,7 +1050,7 @@ let myTuple : (string -> Task) * int = (fun (_s: string) -> Task.FromResul [] let ``check generic task code ``() = CompilerAssert.CompileExeAndRunWithOptions( - [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |], + [| "/optimize-"; "/debug:portable"; "/tailcalls-" |], """ module Test @@ -1083,7 +1083,7 @@ printfn "test passed" [] let ``check generic task exact code``() = CompilerAssert.CompileLibraryAndVerifyILWithOptions( - [| "/langversion:preview";"/optimize-";"/debug:portable";"/tailcalls-" |], + [| "/optimize-"; "/debug:portable"; "/tailcalls-" |], """ module Test diff --git a/tests/fsharp/Compiler/Conformance/DataExpressions/ComputationExpressions.fs b/tests/fsharp/Compiler/Conformance/DataExpressions/ComputationExpressions.fs index 09b64c6cb703..bc4126ab5f36 100644 --- a/tests/fsharp/Compiler/Conformance/DataExpressions/ComputationExpressions.fs +++ b/tests/fsharp/Compiler/Conformance/DataExpressions/ComputationExpressions.fs @@ -183,13 +183,13 @@ let check msg actual expected = if actual <> expected then failwithf "FAILED %s, let includeMinimal = { includeMergeSourcesOverloads = false; includeBindReturnExtras=false } let ApplicativeLibTest opts source = - CompilerAssert.CompileExeAndRunWithOptions([| "/langversion:preview" |], (Source (applicativeLib opts + source))) + CompilerAssert.CompileExeAndRunWithOptions([| |], (Source (applicativeLib opts + source))) let ApplicativeLibErrorTest opts source errors = let lib = applicativeLib opts // Adjust the expected errors for the number of lines in the library let libLineAdjust = lib |> Seq.filter (fun c -> c = '\n') |> Seq.length - CompilerAssert.TypeCheckWithErrorsAndOptionsAndAdjust [| "/langversion:preview" |] libLineAdjust (lib + source) errors + CompilerAssert.TypeCheckWithErrorsAndOptionsAndAdjust [| |] libLineAdjust (lib + source) errors let ApplicativeLibErrorTestFeatureDisabled opts source errors = let lib = applicativeLib opts @@ -785,7 +785,7 @@ let check msg actual expected = if actual <> expected then failwithf "FAILED %s, """ let OverloadLibTest inclInternalExt inclExternalExt source = - CompilerAssert.CompileExeAndRunWithOptions([| "/langversion:preview" |], (Source (overloadLib inclInternalExt inclExternalExt + source))) + CompilerAssert.CompileExeAndRunWithOptions([| |], (Source (overloadLib inclInternalExt inclExternalExt + source))) [] let ``OverloadLib accepts overloaded methods`` () = diff --git a/tests/fsharp/Compiler/Language/StringInterpolation.fs b/tests/fsharp/Compiler/Language/StringInterpolation.fs index 293a44459dc7..f044f312ffb0 100644 --- a/tests/fsharp/Compiler/Language/StringInterpolation.fs +++ b/tests/fsharp/Compiler/Language/StringInterpolation.fs @@ -547,7 +547,7 @@ check "vcewweh20" $"x = %A{1}" "x = 1" [] let ``%B succeeds for langVersion preview`` () = CompilerAssert.CompileExeAndRunWithOptions( - [| "--langversion:preview" |], + [| |], """ let check msg a b = if a = b then printfn "test case '%s' succeeded" msg else failwithf "test case '%s' failed, expected %A, got %A" msg b a diff --git a/tests/fsharp/Compiler/Language/StructActivePatternTests.fs b/tests/fsharp/Compiler/Language/StructActivePatternTests.fs index c1e71755e1b8..e2382b2f4412 100644 --- a/tests/fsharp/Compiler/Language/StructActivePatternTests.fs +++ b/tests/fsharp/Compiler/Language/StructActivePatternTests.fs @@ -10,7 +10,7 @@ open FSharp.Test module StructActivePatternTests = let private pass = CompilerAssert.PassWithOptions [||] - let private fail = CompilerAssert.TypeCheckWithErrorsAndOptions [||] + let private fail = CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:8.0"|] let private run src = CompilerAssert.CompileExeAndRunWithOptions( [||], (""" @@ -180,7 +180,7 @@ let (|Foo|_|) x = ValueNone [|(FSharpDiagnosticSeverity.Error, 842, (2, 3, 2, 9), "This attribute is not valid for use on this language element"); (FSharpDiagnosticSeverity.Error, 3350, (2, 1, 3, 16), - "Feature 'Boolean-returning and return-type-directed partial active patterns' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.")|] + "Feature 'Boolean-returning and return-type-directed partial active patterns' is not available in F# 8.0. Please use language version 9.0 or greater.")|] [] let ``StructAttribute not allowed on other bindings than partial active pattern definitions`` () = diff --git a/tests/fsharp/Compiler/Libraries/Core/LanguagePrimitives/CastToUnitsTests.fs b/tests/fsharp/Compiler/Libraries/Core/LanguagePrimitives/CastToUnitsTests.fs index be85ccd40923..c2194c582685 100644 --- a/tests/fsharp/Compiler/Libraries/Core/LanguagePrimitives/CastToUnitsTests.fs +++ b/tests/fsharp/Compiler/Libraries/Core/LanguagePrimitives/CastToUnitsTests.fs @@ -10,7 +10,7 @@ module ``Cast to Units Tests`` = [] let ``Casting to Measures should compile``() = - CompilerAssert.PassWithOptions [| "--langversion:preview" |] + CompilerAssert.PassWithOptions [| |] """ module M diff --git a/tests/fsharp/optimize/analyses/effects.HasEffect.output.test.bsl b/tests/fsharp/optimize/analyses/effects.HasEffect.output.test.bsl index 709d75c6df2c..5c7c70903c96 100644 --- a/tests/fsharp/optimize/analyses/effects.HasEffect.output.test.bsl +++ b/tests/fsharp/optimize/analyses/effects.HasEffect.output.test.bsl @@ -45,6 +45,9 @@ function simpleLibraryUse16 at line 63 causes no side effects function simpleLibraryUse17 at line 64 causes side effects or may not terminate function simpleLibraryUse18 at line 65 causes side effects or may not terminate function simpleLibraryUse19 at line 66 causes side effects or may not terminate +function IsSetEmpty at line 69 causes no side effects +function IsSetNode at line 70 causes no side effects +function IsSetOne at line 71 causes no side effects function complexDataAnalysisFunction at line 73 causes no side effects function complexDataConstructionFunction at line 81 causes side effects or may not terminate function veryComplexDataConstructionFunction at line 90 causes side effects or may not terminate diff --git a/tests/fsharp/optimize/analyses/tailcalls.NoNeedToTailcall.output.test.bsl b/tests/fsharp/optimize/analyses/tailcalls.NoNeedToTailcall.output.test.bsl index 5f4e677efc60..a35f4c28e2ab 100644 --- a/tests/fsharp/optimize/analyses/tailcalls.NoNeedToTailcall.output.test.bsl +++ b/tests/fsharp/optimize/analyses/tailcalls.NoNeedToTailcall.output.test.bsl @@ -48,6 +48,9 @@ value simpleLibraryUse16 at line 71 does not make a critical tailcall value simpleLibraryUse17 at line 72 does not make a critical tailcall value simpleLibraryUse18 at line 73 does not make a critical tailcall value simpleLibraryUse19 at line 74 does not make a critical tailcall +value IsSetEmpty at line 77 does not make a critical tailcall +value IsSetNode at line 78 does not make a critical tailcall +value IsSetOne at line 79 does not make a critical tailcall value complexDataAnalysisFunction at line 81 does not make a critical tailcall value complexDataConstructionFunction at line 89 does not make a critical tailcall value veryComplexDataConstructionFunction at line 98 does not make a critical tailcall diff --git a/tests/fsharp/optimize/stats/ILLink.LinkAttributes.xml b/tests/fsharp/optimize/stats/ILLink.LinkAttributes.xml index 70eba54ff4ed..47a3ff01f028 100644 --- a/tests/fsharp/optimize/stats/ILLink.LinkAttributes.xml +++ b/tests/fsharp/optimize/stats/ILLink.LinkAttributes.xml @@ -169,5 +169,11 @@ + + + + + + diff --git a/tests/fsharp/optimize/stats/ILLink.Substitutions.xml b/tests/fsharp/optimize/stats/ILLink.Substitutions.xml index 42d44a0b4c4d..13ceee32a140 100644 --- a/tests/fsharp/optimize/stats/ILLink.Substitutions.xml +++ b/tests/fsharp/optimize/stats/ILLink.Substitutions.xml @@ -4,5 +4,10 @@ + + + + + diff --git a/tests/fsharp/tests.fs b/tests/fsharp/tests.fs index e8af104e2c73..07a0ba962f3a 100644 --- a/tests/fsharp/tests.fs +++ b/tests/fsharp/tests.fs @@ -39,24 +39,24 @@ module CoreTests = #if !NETCOREAPP [] - let ``subtype-langversion-preview-checknulls`` () = + let ``subtype-langversion-checknulls`` () = let cfg = testConfig "core/subtype" use testOkFile = fileguard cfg "test.ok" - fsc cfg "%s -o:test-checknulls.exe -g --langversion:preview --checknulls" cfg.fsc_flags ["test.fsx"] + fsc cfg "%s -o:test-checknulls.exe -g --checknulls" cfg.fsc_flags ["test.fsx"] exec cfg ("." ++ "test-checknulls.exe") "" testOkFile.CheckExists() [] - let ``subtype-langversion-preview-no-checknulls`` () = + let ``subtype-langversion-no-checknulls`` () = let cfg = testConfig "core/subtype" use testOkFile = fileguard cfg "test.ok" - fsc cfg "%s -o:test-no-checknulls.exe -g --langversion:preview --checknulls-" cfg.fsc_flags ["test.fsx"] + fsc cfg "%s -o:test-no-checknulls.exe -g --checknulls-" cfg.fsc_flags ["test.fsx"] exec cfg ("." ++ "test-no-checknulls.exe") "" @@ -162,7 +162,7 @@ module CoreTests = use testOkFile = fileguard cfg "test.ok" - fsc cfg "%s -o:test.exe -g --tailcalls- --optimize- --langversion:preview" cfg.fsc_flags ["test.fsx"] + fsc cfg "%s -o:test.exe -g --tailcalls- --optimize-" cfg.fsc_flags ["test.fsx"] peverify cfg "test.exe" @@ -176,7 +176,7 @@ module CoreTests = use testOkFile = fileguard cfg "test.ok" - fsc cfg "%s -o:test.exe -g --tailcalls+ --optimize+ --langversion:preview" cfg.fsc_flags ["test.fsx"] + fsc cfg "%s -o:test.exe -g --tailcalls+ --optimize+" cfg.fsc_flags ["test.fsx"] peverify cfg "test.exe" @@ -994,12 +994,12 @@ module CoreTests = let ``libtest-FSC_NETFX_TEST_ROUNDTRIP_AS_DLL`` () = singleTestBuildAndRun "core/libtest" FSC_NETFX_TEST_ROUNDTRIP_AS_DLL [] - let ``libtest-langversion-preview-checknulls`` () = + let ``libtest-langversion-checknulls`` () = let cfg = testConfig "core/libtest" use testOkFile = fileguard cfg "test.ok" - fsc cfg "%s -o:test-checknulls.exe -g --langversion:preview --checknulls" cfg.fsc_flags ["test.fsx"] + fsc cfg "%s -o:test-checknulls.exe -g --checknulls" cfg.fsc_flags ["test.fsx"] exec cfg ("." ++ "test-checknulls.exe") "" @@ -2161,7 +2161,7 @@ module TypecheckTests = [] let ``sigs pos41`` () = let cfg = testConfig "typecheck/sigs" - fsc cfg "%s --target:library -o:pos41.dll --warnaserror --langversion:preview" cfg.fsc_flags ["pos41.fs"] + fsc cfg "%s --target:library -o:pos41.dll --warnaserror" cfg.fsc_flags ["pos41.fs"] peverify cfg "pos41.dll" [] diff --git a/tests/fsharp/typecheck/overloads/neg_known_return_type_and_known_type_arguments.bsl b/tests/fsharp/typecheck/overloads/neg_known_return_type_and_known_type_arguments.bsl index 363ac731b274..bb7711b10783 100644 --- a/tests/fsharp/typecheck/overloads/neg_known_return_type_and_known_type_arguments.bsl +++ b/tests/fsharp/typecheck/overloads/neg_known_return_type_and_known_type_arguments.bsl @@ -9,6 +9,7 @@ Available overloads: - static member Zero.Zero: 'a array * Zero -> 'a array // Argument at index 1 doesn't match - static member Zero.Zero: 'a list * Zero -> 'a list // Argument at index 1 doesn't match - static member Zero.Zero: 'a option * Zero -> 'a option // Argument at index 1 doesn't match + - static member Zero.Zero: 'a seq * Zero -> 'a seq // Argument at index 1 doesn't match - static member Zero.Zero: ('T -> ^Monoid) * Zero -> ('T -> ^Monoid) when (Zero or ^Monoid) : (static member Zero: ^Monoid * Zero -> ^Monoid) // Argument at index 1 doesn't match - static member Zero.Zero: Async<^a> * Zero -> Async<^a> when (Zero or ^a) : (static member Zero: ^a * Zero -> ^a) // Argument at index 1 doesn't match - static member Zero.Zero: Lazy<^a> * Zero -> Lazy<^a> when (Zero or ^a) : (static member Zero: ^a * Zero -> ^a) // Argument at index 1 doesn't match @@ -21,6 +22,5 @@ Available overloads: - static member Zero.Zero: ^t * Default2 -> ('a1 -> 'a1) when ^t: null and ^t: struct // Argument at index 1 doesn't match - static member Zero.Zero: ^t * Default2 -> ^t when (FromInt32 or ^t) : (static member FromInt32: ^t * FromInt32 -> (int32 -> ^t)) // Argument at index 1 doesn't match - static member Zero.Zero: ^t * Default3 -> ^t when ^t: (static member Empty: ^t) // Argument at index 1 doesn't match - - static member Zero.Zero: 'a seq * Zero -> 'a seq // Argument at index 1 doesn't match - static member Zero.Zero: string * Zero -> string // Argument at index 1 doesn't match - static member Zero.Zero: unit * Zero -> unit // Argument at index 1 doesn't match diff --git a/tests/fsharp/typecheck/sigs/neg06_a.bsl b/tests/fsharp/typecheck/sigs/neg06_a.bsl index 389cbbdc9816..88c0b20e6285 100644 --- a/tests/fsharp/typecheck/sigs/neg06_a.bsl +++ b/tests/fsharp/typecheck/sigs/neg06_a.bsl @@ -1,4 +1,8 @@ +neg06_a.fs(5,16,5,17): typecheck error FS0434: The property 'IsD' has the same name as a method in type 'NameClashesWithDefaultAugmentation.T'. + +neg06_a.fs(4,16,4,17): typecheck error FS0434: The property 'IsC' has the same name as a method in type 'NameClashesWithDefaultAugmentation.T'. + neg06_a.fs(8,23,8,26): typecheck error FS0023: The member 'IsC' can not be defined because the name 'IsC' clashes with the default augmentation of the union case 'C' in this type or module neg06_a.fs(13,28,13,31): typecheck error FS0023: The member 'IsD' can not be defined because the name 'IsD' clashes with the default augmentation of the union case 'D' in this type or module diff --git a/tests/fsharp/typecheck/sigs/neg103.bsl b/tests/fsharp/typecheck/sigs/neg103.bsl index e371cbd64c38..e59a1669e7b2 100644 --- a/tests/fsharp/typecheck/sigs/neg103.bsl +++ b/tests/fsharp/typecheck/sigs/neg103.bsl @@ -4,21 +4,27 @@ neg103.fs(7,12,7,22): typecheck error FS0001: This expression was expected to ha but here has type 'string' -neg103.fs(11,5,11,11): typecheck error FS0025: Incomplete pattern matches on this expression. - neg103.fs(12,7,12,15): typecheck error FS0001: This expression was expected to have type 'int' but here has type 'MyUnion' -neg103.fs(17,7,17,15): typecheck error FS0001: This expression was expected to have type +neg103.fs(12,18,12,23): typecheck error FS0001: This expression was expected to have type 'int' but here has type 'MyUnion' -neg103.fs(12,18,12,23): typecheck error FS0001: This expression was expected to have type - neg103.fs(12,26,12,34): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' + +neg103.fs(11,5,11,11): typecheck error FS0025: Incomplete pattern matches on this expression. + +neg103.fs(17,7,17,15): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' neg103.fs(15,5,15,11): typecheck error FS0025: Incomplete pattern matches on this expression. @@ -29,13 +35,19 @@ but here has type neg103.fs(20,5,20,11): typecheck error FS0025: Incomplete pattern matches on this expression. -neg103.fs(24,9,24,15): typecheck error FS0025: Incomplete pattern matches on this expression. - neg103.fs(25,11,25,19): typecheck error FS0001: This expression was expected to have type 'int' but here has type 'MyUnion' neg103.fs(25,22,25,27): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' neg103.fs(25,30,25,38): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' + +neg103.fs(24,9,24,15): typecheck error FS0025: Incomplete pattern matches on this expression. diff --git a/tests/fsharp/typecheck/sigs/neg103.vsbsl b/tests/fsharp/typecheck/sigs/neg103.vsbsl index 7bb76aecb8dc..e59a1669e7b2 100644 --- a/tests/fsharp/typecheck/sigs/neg103.vsbsl +++ b/tests/fsharp/typecheck/sigs/neg103.vsbsl @@ -4,24 +4,30 @@ neg103.fs(7,12,7,22): typecheck error FS0001: This expression was expected to ha but here has type 'string' -neg103.fs(11,5,11,11): typecheck error FS0025: Incomplete pattern matches on this expression. - neg103.fs(12,7,12,15): typecheck error FS0001: This expression was expected to have type 'int' but here has type 'MyUnion' neg103.fs(12,18,12,23): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' neg103.fs(12,26,12,34): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' -neg103.fs(15,5,15,11): typecheck error FS0025: Incomplete pattern matches on this expression. +neg103.fs(11,5,11,11): typecheck error FS0025: Incomplete pattern matches on this expression. neg103.fs(17,7,17,15): typecheck error FS0001: This expression was expected to have type 'int' but here has type 'MyUnion' +neg103.fs(15,5,15,11): typecheck error FS0025: Incomplete pattern matches on this expression. + neg103.fs(21,7,21,9): typecheck error FS0001: This expression was expected to have type 'Async' but here has type @@ -29,13 +35,19 @@ but here has type neg103.fs(20,5,20,11): typecheck error FS0025: Incomplete pattern matches on this expression. -neg103.fs(24,9,24,15): typecheck error FS0025: Incomplete pattern matches on this expression. - neg103.fs(25,11,25,19): typecheck error FS0001: This expression was expected to have type 'int' but here has type 'MyUnion' neg103.fs(25,22,25,27): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' neg103.fs(25,30,25,38): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' + +neg103.fs(24,9,24,15): typecheck error FS0025: Incomplete pattern matches on this expression. diff --git a/tests/fsharp/typecheck/sigs/neg104.vsbsl b/tests/fsharp/typecheck/sigs/neg104.vsbsl index 89206431139e..12c1c451d3ef 100644 --- a/tests/fsharp/typecheck/sigs/neg104.vsbsl +++ b/tests/fsharp/typecheck/sigs/neg104.vsbsl @@ -27,6 +27,4 @@ neg104.fs(20,9,20,15): typecheck error FS0025: Incomplete pattern matches on thi neg104.fs(23,9,23,15): typecheck error FS0025: Incomplete pattern matches on this expression. -neg104.fs(32,21,32,26): typecheck error FS0003: This value is not a function and cannot be applied. - neg104.fs(35,9,35,18): typecheck error FS0748: This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. diff --git a/tests/fsharp/typecheck/sigs/neg82.vsbsl b/tests/fsharp/typecheck/sigs/neg82.vsbsl index e0e96dcd0b0d..a57ce6cbf677 100644 --- a/tests/fsharp/typecheck/sigs/neg82.vsbsl +++ b/tests/fsharp/typecheck/sigs/neg82.vsbsl @@ -26,31 +26,4 @@ To continue using non-conforming indentation, pass the '--strict-indentation-' f neg82.fsx(138,1,138,4): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (102:1). Try indenting this further. To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. -neg82.fsx(84,5,84,6): parse error FS0010: Unexpected symbol '|' in expression - -neg82.fsx(88,1,88,4): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (81:9). Try indenting this further. -To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - -neg82.fsx(90,5,90,8): parse error FS0010: Incomplete structured construct at or before this point in expression. Expected incomplete structured construct at or before this point or other token. - -neg82.fsx(95,1,95,4): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (88:1). Try indenting this further. -To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - -neg82.fsx(95,1,95,4): parse error FS0010: Unexpected keyword 'let' or 'use' in implementation file - -neg82.fsx(96,1,96,4): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (95:1). Try indenting this further. -To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - -neg82.fsx(97,1,97,4): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (96:1). Try indenting this further. -To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - -neg82.fsx(100,1,100,4): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (97:1). Try indenting this further. -To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - -neg82.fsx(102,1,102,4): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (100:1). Try indenting this further. -To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - -neg82.fsx(138,1,138,4): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (102:1). Try indenting this further. -To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - neg82.fsx(93,5,93,7): typecheck error FS0039: The value, namespace, type or module 'sb' is not defined. diff --git a/tests/fsharp/typecheck/sigs/neg83.bsl b/tests/fsharp/typecheck/sigs/neg83.bsl index bfb995922207..b8858cfbe114 100644 --- a/tests/fsharp/typecheck/sigs/neg83.bsl +++ b/tests/fsharp/typecheck/sigs/neg83.bsl @@ -7,7 +7,4 @@ To continue using non-conforming indentation, pass the '--strict-indentation-' f neg83.fsx(13,2,13,5): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:4). Try indenting this further. To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. -neg83.fsx(13,2,13,5): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:4). Try indenting this further. -To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - neg83.fsx(16,1,16,1): parse error FS0010: Incomplete structured construct at or before this point in expression diff --git a/tests/fsharp/typecheck/sigs/neg83.vsbsl b/tests/fsharp/typecheck/sigs/neg83.vsbsl index f60af0b4637b..b8858cfbe114 100644 --- a/tests/fsharp/typecheck/sigs/neg83.vsbsl +++ b/tests/fsharp/typecheck/sigs/neg83.vsbsl @@ -7,20 +7,4 @@ To continue using non-conforming indentation, pass the '--strict-indentation-' f neg83.fsx(13,2,13,5): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:4). Try indenting this further. To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. -neg83.fsx(13,2,13,5): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:4). Try indenting this further. -To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - -neg83.fsx(16,1,16,1): parse error FS0010: Incomplete structured construct at or before this point in expression - -neg83.fsx(10,5,10,6): parse error FS0010: Unexpected symbol '|' in expression - -neg83.fsx(13,1,13,2): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:4). Try indenting this further. -To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - -neg83.fsx(13,2,13,5): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:4). Try indenting this further. -To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - -neg83.fsx(13,2,13,5): parse error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:4). Try indenting this further. -To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - neg83.fsx(16,1,16,1): parse error FS0010: Incomplete structured construct at or before this point in expression diff --git a/tests/fsharpqa/Source/CompilerOptions/fsi/langversion/langversionhelp.437.1033.bsl b/tests/fsharpqa/Source/CompilerOptions/fsi/langversion/langversionhelp.437.1033.bsl index 9d7ff2f395c7..b5e699f5f641 100644 --- a/tests/fsharpqa/Source/CompilerOptions/fsi/langversion/langversionhelp.437.1033.bsl +++ b/tests/fsharpqa/Source/CompilerOptions/fsi/langversion/langversionhelp.437.1033.bsl @@ -8,4 +8,5 @@ latestmajor 5.0 6.0 7.0 -8.0 (Default) \ No newline at end of file +8.0 +9.0 (Default) \ No newline at end of file diff --git a/tests/service/FsUnit.fs b/tests/service/FsUnit.fs index fc4964c574f4..e5b0962449c3 100644 --- a/tests/service/FsUnit.fs +++ b/tests/service/FsUnit.fs @@ -16,7 +16,8 @@ let should (f : 'a -> #Constraint) x (y : obj) = let equal x = EqualConstraint(x) /// like "should equal", but validates same-type -let shouldEqual (x: 'a) (y: 'a) = Assert.AreEqual(x, y, sprintf "Expected: %A\nActual: %A" x y) +let shouldEqual (x: 'a) (y: 'a) = + Assert.AreEqual(x, y, sprintf "Expected: %A\nActual: %A" x y) /// Same as 'shouldEqual' but goes pairwise over the collections. Lengths must be equal. let shouldPairwiseEqual (x: seq<_>) (y: seq<_>) = From 97a2a75fae37f4357838d41f406ff01b5d732a29 Mon Sep 17 00:00:00 2001 From: Brian Rourke Boll Date: Fri, 9 Aug 2024 19:25:36 -0400 Subject: [PATCH 11/13] Reduce allocations in some `Array.Parallel` funcs (#17505) --- src/FSharp.Core/array.fs | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/FSharp.Core/array.fs b/src/FSharp.Core/array.fs index 03aaaf25b49d..5ddcd340e68a 100644 --- a/src/FSharp.Core/array.fs +++ b/src/FSharp.Core/array.fs @@ -2179,9 +2179,8 @@ module Array = // Not exists $condition <==> (opposite of $condition is true forall) exists (predicate >> not) array |> not - [] - let tryFindIndex predicate (array: _ array) = - checkNonNull "array" array + let inline tryFindIndexAux predicate (array: _ array) = + checkNonNull (nameof array) array let pResult = Parallel.For( @@ -2192,16 +2191,24 @@ module Array = pState.Break()) ) - pResult.LowestBreakIteration |> Option.ofNullable |> Option.map int + pResult.LowestBreakIteration + + [] + let tryFindIndex predicate (array: _ array) = + let i = tryFindIndexAux predicate array + if i.HasValue then Some (int (i.GetValueOrDefault())) + else None [] let tryFind predicate (array: _ array) = - array |> tryFindIndex predicate |> Option.map (fun i -> array[i]) + let i = tryFindIndexAux predicate array + if i.HasValue then Some array[int (i.GetValueOrDefault())] + else None [] let tryPick chooser (array: _ array) = checkNonNull "array" array - let allChosen = new System.Collections.Concurrent.ConcurrentDictionary<_, _>() + let allChosen = System.Collections.Concurrent.ConcurrentDictionary() let pResult = Parallel.For( @@ -2215,9 +2222,8 @@ module Array = pState.Break()) ) - pResult.LowestBreakIteration - |> Option.ofNullable - |> Option.bind (fun i -> allChosen[int i]) + if pResult.LowestBreakIteration.HasValue then allChosen[int (pResult.LowestBreakIteration.GetValueOrDefault())] + else None [] let choose chooser (array: 'T array) = From 182dd576c80e1a147bd940e69b98e2bbd4bcb10d Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Sun, 11 Aug 2024 00:20:44 +0100 Subject: [PATCH 12/13] Fix missing message with type error (FS0001) (#17516) --- .../.FSharp.Compiler.Service/9.0.100.md | 1 + src/Compiler/Driver/CompilerDiagnostics.fs | 7 ++++++- .../ErrorMessages/TypeMismatchTests.fs | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md index f05d847075dc..fd64a8f43493 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md @@ -6,6 +6,7 @@ * C# protected property can be assigned in F# inherit constructor call. ([Issue #13299](https://github.com/dotnet/fsharp/issues/13299), [PR #17391](https://github.com/dotnet/fsharp/pull/17391)) * MethodAccessException on equality comparison of a record with private fields. ([Issue #17447](https://github.com/dotnet/fsharp/issues/17447), [PR #17391](https://github.com/dotnet/fsharp/pull/17467)) * Compiler fails to recognise namespace in FQN with enabled GraphBasedChecking. ([Issue #17508](https://github.com/dotnet/fsharp/issues/17508), [PR #17510](https://github.com/dotnet/fsharp/pull/17510)) +* Fix missing message for type error (FS0001). ([Issue #17373](https://github.com/dotnet/fsharp/issues/17373), [PR #17516](https://github.com/dotnet/fsharp/pull/17516)) ### Added diff --git a/src/Compiler/Driver/CompilerDiagnostics.fs b/src/Compiler/Driver/CompilerDiagnostics.fs index 5ac8f4484486..00c1fdec81ab 100644 --- a/src/Compiler/Driver/CompilerDiagnostics.fs +++ b/src/Compiler/Driver/CompilerDiagnostics.fs @@ -809,7 +809,7 @@ type Exception with | ErrorFromAddingTypeEquation(error = ConstraintSolverError _ as e) -> e.Output(os, suggestNames) - | ErrorFromAddingTypeEquation(_g, denv, ty1, ty2, ConstraintSolverTupleDiffLengths(_, contextInfo, tl1, tl2, _, _), m) -> + | ErrorFromAddingTypeEquation(_g, denv, ty1, ty2, ConstraintSolverTupleDiffLengths(_, contextInfo, tl1, tl2, m1, m2), m) -> let ty1, ty2, tpcs = NicePrint.minimalStringsOfTwoTypes denv ty1 ty2 let messageArgs = tl1.Length, ty1, tl2.Length, ty2 @@ -826,6 +826,11 @@ type Exception with else os.AppendString(FSComp.SR.listElementHasWrongTypeTuple messageArgs) | _ -> os.AppendString(ErrorFromAddingTypeEquationTuplesE().Format tl1.Length ty1 tl2.Length ty2 tpcs) + else + os.AppendString(ConstraintSolverTupleDiffLengthsE().Format tl1.Length tl2.Length) + + if m1.StartLine <> m2.StartLine then + os.AppendString(SeeAlsoE().Format(stringOfRange m1)) | ErrorFromAddingTypeEquation(g, denv, ty1, ty2, e, _) -> if not (typeEquiv g ty1 ty2) then diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TypeMismatchTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TypeMismatchTests.fs index 06dc7d44671e..34263b3f7bcf 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TypeMismatchTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TypeMismatchTests.fs @@ -351,3 +351,22 @@ let f4 = (Error 1, Line 28, Col 9, Line 28, Col 12, "This expression was expected to have type\n 'int64' \nbut here has type\n 'float' ") ] + [] + let ``Error when tuples have differing lengths and we do not know the types.``() = + Fsx """ +let foo items = + for (a,b,c) in items do + printfn "%A" (a, c) + +[] +let main args = + foo ({1..10} |> Seq.pairwise) + 0 + """ + |> asExe + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 1, Line 8, Col 21, Line 8, Col 33, "The tuples have differing lengths of 3 and 2") + ] + From a0f1e31569bae4ccb2955615994139b7c1f9b752 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Sun, 11 Aug 2024 00:21:52 +0100 Subject: [PATCH 13/13] `function` implicit conversion the same way as `fun x` (#17487) --- .../.FSharp.Compiler.Service/9.0.100.md | 1 + .../Checking/Expressions/CheckExpressions.fs | 46 ++++++++++++------- .../OverloadResolutionUsingFunction.fs | 42 +++++++++++++++++ .../OverloadingMembers/OverloadingMembers.fs | 6 +++ 4 files changed, 79 insertions(+), 16 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadResolutionUsingFunction.fs diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md index fd64a8f43493..0d750d049e52 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md @@ -5,6 +5,7 @@ * Optimize simple mappings in comprehensions when the body of the mapping has `let`-bindings and/or sequential expressions before a single yield. ([PR #17419](https://github.com/dotnet/fsharp/pull/17419)) * C# protected property can be assigned in F# inherit constructor call. ([Issue #13299](https://github.com/dotnet/fsharp/issues/13299), [PR #17391](https://github.com/dotnet/fsharp/pull/17391)) * MethodAccessException on equality comparison of a record with private fields. ([Issue #17447](https://github.com/dotnet/fsharp/issues/17447), [PR #17391](https://github.com/dotnet/fsharp/pull/17467)) +* Fix `function` implicit conversion. ([Issue #7401](https://github.com/dotnet/fsharp/issues/7401), [PR #17487](https://github.com/dotnet/fsharp/pull/17487)) * Compiler fails to recognise namespace in FQN with enabled GraphBasedChecking. ([Issue #17508](https://github.com/dotnet/fsharp/issues/17508), [PR #17510](https://github.com/dotnet/fsharp/pull/17510)) * Fix missing message for type error (FS0001). ([Issue #17373](https://github.com/dotnet/fsharp/issues/17373), [PR #17516](https://github.com/dotnet/fsharp/pull/17516)) diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 585939038fba..4f8ef2b7a61e 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -9672,22 +9672,36 @@ and TcMethodApplicationThen PropagateThenTcDelayed cenv overallTy env tpenv mWholeExpr (MakeApplicableExprNoFlex cenv expr) exprTy atomicFlag delayed /// Infer initial type information at the callsite from the syntax of an argument, prior to overload resolution. -and GetNewInferenceTypeForMethodArg (cenv: cenv) env tpenv x = +and GetNewInferenceTypeForMethodArg (cenv: cenv) x = let g = cenv.g - match x with - | SynExprParen(a, _, _, _) -> - GetNewInferenceTypeForMethodArg cenv env tpenv a - | SynExpr.AddressOf (true, a, _, m) -> - mkByrefTyWithInference g (GetNewInferenceTypeForMethodArg cenv env tpenv a) (NewByRefKindInferenceType g m) - | SynExpr.Lambda (body = a) - | SynExpr.DotLambda (expr = a) -> - mkFunTy g (NewInferenceType g) (GetNewInferenceTypeForMethodArg cenv env tpenv a) - | SynExpr.Quote (_, raw, a, _, _) -> - if raw then mkRawQuotedExprTy g - else mkQuotedExprTy g (GetNewInferenceTypeForMethodArg cenv env tpenv a) - | _ -> NewInferenceType g + let rec loopExpr expr cont : struct (_ * _) = + match expr with + | SynExprParen (a, _, _, _) -> + loopExpr a cont + | SynExpr.AddressOf (true, a, _, m) -> + loopExpr a (cont << fun struct (depth, ty) -> depth + 1, mkByrefTyWithInference g ty (NewByRefKindInferenceType g m)) + | SynExpr.Lambda (body = a) + | SynExpr.DotLambda (expr = a) -> + loopExpr a (cont << fun struct (depth, ty) -> depth + 1, mkFunTy g (NewInferenceType g) ty) + | SynExpr.MatchLambda (matchClauses = SynMatchClause (resultExpr = a) :: clauses) -> + let loopClause a = loopExpr a (cont << fun struct (depth, ty) -> depth + 1, mkFunTy g (NewInferenceType g) ty) + + // Look at all branches, keeping the one + // that gives us the most syntactic information. + (loopClause a, clauses) + ||> List.fold (fun ((maxClauseDepth, _) as acc) (SynMatchClause (resultExpr = a)) -> + match loopClause a with + | clauseDepth, ty when clauseDepth > maxClauseDepth -> clauseDepth, ty + | _ -> acc) + | SynExpr.Quote (_, raw, a, _, _) -> + if raw then cont (0, mkRawQuotedExprTy g) + else loopExpr a (cont << fun struct (depth, ty) -> depth + 1, mkQuotedExprTy g ty) + | _ -> cont (0, NewInferenceType g) + + let struct (_depth, ty) = loopExpr x id + ty and CalledMethHasSingleArgumentGroupOfThisLength n (calledMeth: MethInfo) = match calledMeth.NumArgs with @@ -9722,7 +9736,7 @@ and UnifyMatchingSimpleArgumentTypes (cenv: cenv) (env: TcEnv) exprTy (calledMet and TcMethodApplication_SplitSynArguments (cenv: cenv) (env: TcEnv) - tpenv + _tpenv isProp (candidates: MethInfo list) (exprTy: OverallTy) @@ -9750,7 +9764,7 @@ and TcMethodApplication_SplitSynArguments else unnamedCurriedCallerArgs, namedCurriedCallerArgs - let MakeUnnamedCallerArgInfo x = (x, GetNewInferenceTypeForMethodArg cenv env tpenv x, x.Range) + let MakeUnnamedCallerArgInfo x = (x, GetNewInferenceTypeForMethodArg cenv x, x.Range) let singleMethodCurriedArgs = match candidates with @@ -9789,7 +9803,7 @@ and TcMethodApplication_SplitSynArguments | _ -> let unnamedCurriedCallerArgs = unnamedCurriedCallerArgs |> List.mapSquared MakeUnnamedCallerArgInfo let namedCurriedCallerArgs = namedCurriedCallerArgs |> List.mapSquared (fun (isOpt, nm, x) -> - let ty = GetNewInferenceTypeForMethodArg cenv env tpenv x + let ty = GetNewInferenceTypeForMethodArg cenv x // #435263: compiler crash with .net optional parameters and F# optional syntax // named optional arguments should always have option type // STRUCT OPTIONS: if we allow struct options as optional arguments then we should relax this and rely diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadResolutionUsingFunction.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadResolutionUsingFunction.fs new file mode 100644 index 000000000000..33560ae93893 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadResolutionUsingFunction.fs @@ -0,0 +1,42 @@ +open System +let ae = new AggregateException() + +ae.Handle(fun e -> + match e with + | :? OperationCanceledException -> true + | _ -> false + ) + +ae.Handle(function + | :? OperationCanceledException -> true + | _ -> false + ) + +ae.Handle( + Func( + function + | :? OperationCanceledException -> true + | _ -> false + )) + +module M1 = + type T = + static member M (_ : Func) = () + + T.M (function _ -> function :? ArgumentException -> 3 | _ -> 4) + T.M (function 0 -> (function _ -> 3) | _ -> function :? ArgumentException -> 3 | _ -> 4) + +module M2 = + type T = + static member M (_ : Func) = () + + T.M (function 0 -> (function _ -> 1) | _ -> (function 0 -> 3 | _ -> 4)) + T.M (function 0 -> id | _ -> (function 0 -> 3 | _ -> 4)) + T.M (function 0 -> (function 0 -> 3 | _ -> 4) | _ -> id) + +module M3 = + type T = + static member M (_ : Func) = () + + T.M (function 0 -> (function 0 -> (function 0 -> 1 | _ -> 0) | _ -> (function 0 -> 2 | _ -> 3)) | _ -> (function 0 -> (function _ -> 3) | _ -> (function 3 -> 4 | _ -> 5))) + T.M (function 0 -> (function 0 -> id | _ -> (function 0 -> 2 | _ -> 3)) | _ -> (function 0 -> (function _ -> 3) | _ -> (function 3 -> 4 | _ -> 5))) diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadingMembers.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadingMembers.fs index 1bc2d3322477..e0b4c824187d 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadingMembers.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadingMembers.fs @@ -229,3 +229,9 @@ module MemberDefinitions_OverloadingMembers = |> withDefines ["TOO_GENERIC"] |> verifyCompileAndRun |> shouldSucceed + + [] + let ``OverloadResolutionUsingFunction_fs`` compilation = + compilation + |> verifyCompileAndRun + |> shouldSucceed