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 99c251d76c2..e2562e5a4c0 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,9 @@
* 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))
### Added
@@ -12,6 +15,7 @@
* Parser: recover on missing union case fields (PR [#17452](https://github.com/dotnet/fsharp/pull/17452))
* Parser: recover on missing union case field types (PR [#17455](https://github.com/dotnet/fsharp/pull/17455))
* Sink: report function domain type ([PR #17470](https://github.com/dotnet/fsharp/pull/17470))
+* Render C# nullable-analysis attributes in tooltips ([PR #17485](https://github.com/dotnet/fsharp/pull/17485))
### Changed
@@ -21,5 +25,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 9438303a7ed..503a6c17d85 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 538587cee4e..2f0001ef73b 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 6df973cf607..2fb0e2d6977 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/eng/SourceBuildPrebuiltBaseline.xml b/eng/SourceBuildPrebuiltBaseline.xml
index ced31dc1641..4416e9693af 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 5820fde4b23..29a4b0f6b6e 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
@@ -42,14 +42,14 @@
-
+
https://github.com/dotnet/arcade
- 2c829550b968e29389ce8392244da2b006d71301
+ 60ae233c3d77f11c5fdb53e570b64d503b13ba59
-
+
https://github.com/dotnet/arcade
- 2c829550b968e29389ce8392244da2b006d71301
+ 60ae233c3d77f11c5fdb53e570b64d503b13ba59
diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1
index 8fda30bdce2..e3374310563 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 c305ae6bd77..36dbd45e1ce 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 4023209fd0f..17b7d9a82e6 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.2",
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2"
}
}
diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs
index 585939038fb..4f8ef2b7a61 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/src/Compiler/Checking/NicePrint.fs b/src/Compiler/Checking/NicePrint.fs
index 265f0570d7e..046f119ad08 100644
--- a/src/Compiler/Checking/NicePrint.fs
+++ b/src/Compiler/Checking/NicePrint.fs
@@ -38,6 +38,8 @@ module internal PrintUtilities =
let squareAngleL x = LeftL.leftBracketAngle ^^ x ^^ RightL.rightBracketAngle
+ let squareAngleReturn x = LeftL.leftBracketAngle ^^ WordL.keywordReturn ^^ SepL.colon ^^ x ^^ RightL.rightBracketAngle
+
let angleL x = SepL.leftAngle ^^ x ^^ RightL.rightAngle
let braceL x = wordL leftBrace ^^ x ^^ wordL rightBrace
@@ -638,6 +640,23 @@ module PrintTypes =
let argsL = bracketL (sepListL RightL.comma (List.map (layoutILAttribElement denv) args))
PrintIL.layoutILType denv [] ty ++ argsL
+ /// Layout nullness attributes for C# flow-analysis
+ /// F# does not process them, this way we can at least show them.
+ and layoutCsharpCodeAnalysisIlAttributes denv (attrs:ILAttributes) (layoutCombinator: Layout -> Layout -> Layout) restL =
+ let denvShortNames() = { denv with shortTypeNames = true }
+ let attrsL =
+ [ for a in attrs.AsArray() do
+ let name = a.Method.DeclaringType.BasicQualifiedName
+ if name.StartsWith("System.Diagnostics.CodeAnalysis") then
+ let parms, _args = decodeILAttribData a
+ layoutILAttrib (denvShortNames()) (a.Method.DeclaringType, parms)
+ ]
+ match attrsL with
+ | [] -> restL
+ | _ ->
+ let separated = sepListL RightL.semicolon attrsL
+ layoutCombinator separated restL
+
/// Layout '[]' above another block
and layoutAttribs denv startOpt isLiteral kind attrs restL =
@@ -1638,11 +1657,33 @@ module InfoMemberPrinting =
let idL = ConvertValLogicalNameToDisplayLayout false (tagMethod >> tagNavArbValRef minfo.ArbitraryValRef >> wordL) minfo.LogicalName
SepL.dot ^^
PrintTypes.layoutTyparDecls denv idL true minfo.FormalMethodTypars ^^
- SepL.leftParen
+ SepL.leftParen
+
+ let layout,paramLayouts =
+ match denv.showCsharpCodeAnalysisAttributes, minfo with
+ | true, ILMeth(_g,mi,_e) ->
+ let methodLayout =
+ // Render Method attributes and [return:..] attributes on separate lines above (@@) the method definition
+ PrintTypes.layoutCsharpCodeAnalysisIlAttributes denv (minfo.GetCustomAttrs()) (squareAngleL >> (@@)) layout
+ |> PrintTypes.layoutCsharpCodeAnalysisIlAttributes denv (mi.RawMetadata.Return.CustomAttrs) (squareAngleReturn >> (@@))
+ let paramLayouts =
+ minfo.GetParamDatas (amap, m, minst)
+ |> List.head
+ |> List.zip (mi.ParamMetadata)
+ |> List.map(fun (ilParams,paramData) ->
+ layoutParamData denv paramData
+ // Render parameter attributes next to (^^) the parameter definition
+ |> PrintTypes.layoutCsharpCodeAnalysisIlAttributes denv (ilParams.CustomAttrs) (squareAngleL >> (^^)) )
+ methodLayout,paramLayouts
+ | _ ->
+ layout,
+ minfo.GetParamDatas (amap, m, minst)
+ |> List.concat
+ |> List.map (layoutParamData denv)
+
- let paramDatas = minfo.GetParamDatas (amap, m, minst)
- let layout = layout ^^ sepListL RightL.comma ((List.concat >> List.map (layoutParamData denv)) paramDatas)
- layout ^^ RightL.rightParen ^^ WordL.colon ^^ PrintTypes.layoutType denv retTy
+ let layout = layout ^^ sepListL RightL.comma paramLayouts
+ layout ^^ RightL.rightParen ^^ WordL.colon ^^ PrintTypes.layoutType denv retTy // Todo enrich return type
// Prettify an ILMethInfo
let prettifyILMethInfo (amap: Import.ImportMap) m (minfo: MethInfo) typarInst ilMethInfo =
diff --git a/src/Compiler/Driver/CompilerDiagnostics.fs b/src/Compiler/Driver/CompilerDiagnostics.fs
index 5ac8f448448..00c1fdec81a 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/src/Compiler/Driver/GraphChecking/FileContentMapping.fs b/src/Compiler/Driver/GraphChecking/FileContentMapping.fs
index 271e927933a..13ee0c312f9 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/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs
index bfaed329222..2fd2e150bcc 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/Compiler/Facilities/TextLayoutRender.fs b/src/Compiler/Facilities/TextLayoutRender.fs
index 12595b69211..735d44b82ad 100644
--- a/src/Compiler/Facilities/TextLayoutRender.fs
+++ b/src/Compiler/Facilities/TextLayoutRender.fs
@@ -63,6 +63,7 @@ module WordL =
let leftAngle = wordL TaggedText.leftAngle
let keywordModule = wordL TaggedText.keywordModule
let keywordNamespace = wordL TaggedText.keywordNamespace
+ let keywordReturn = wordL TaggedText.keywordReturn
module LeftL =
let leftParen = leftL TaggedText.leftParen
diff --git a/src/Compiler/Facilities/TextLayoutRender.fsi b/src/Compiler/Facilities/TextLayoutRender.fsi
index 0e52b9998f2..96d4b13a184 100644
--- a/src/Compiler/Facilities/TextLayoutRender.fsi
+++ b/src/Compiler/Facilities/TextLayoutRender.fsi
@@ -102,6 +102,7 @@ module internal WordL =
val leftAngle: Layout
val keywordModule: Layout
val keywordNamespace: Layout
+ val keywordReturn: Layout
module internal LeftL =
val leftParen: Layout
diff --git a/src/Compiler/Service/ServiceDeclarationLists.fs b/src/Compiler/Service/ServiceDeclarationLists.fs
index 92729d789f8..39dcb183028 100644
--- a/src/Compiler/Service/ServiceDeclarationLists.fs
+++ b/src/Compiler/Service/ServiceDeclarationLists.fs
@@ -157,7 +157,7 @@ module DeclarationListHelpers =
let rec FormatItemDescriptionToToolTipElement displayFullName (infoReader: InfoReader) ad m denv (item: ItemWithInst) symbol (width: int option) =
let g = infoReader.g
let amap = infoReader.amap
- let denv = SimplerDisplayEnv denv
+ let denv = {SimplerDisplayEnv denv with showCsharpCodeAnalysisAttributes = true }
let xml = GetXmlCommentForItem infoReader m item.Item
match item.Item with
diff --git a/src/Compiler/TypedTree/TypedTreeOps.fs b/src/Compiler/TypedTree/TypedTreeOps.fs
index 685f9a7377c..be78209034e 100644
--- a/src/Compiler/TypedTree/TypedTreeOps.fs
+++ b/src/Compiler/TypedTree/TypedTreeOps.fs
@@ -3145,6 +3145,7 @@ type DisplayEnv =
shortConstraints: bool
useColonForReturnType: bool
showAttributes: bool
+ showCsharpCodeAnalysisAttributes: bool
showOverrides: bool
showStaticallyResolvedTyparAnnotations: bool
showNullnessAnnotations: bool option
@@ -3180,6 +3181,7 @@ type DisplayEnv =
suppressMutableKeyword = false
showMemberContainers = false
showAttributes = false
+ showCsharpCodeAnalysisAttributes = false
showOverrides = true
showStaticallyResolvedTyparAnnotations = true
showNullnessAnnotations = None
diff --git a/src/Compiler/TypedTree/TypedTreeOps.fsi b/src/Compiler/TypedTree/TypedTreeOps.fsi
index 2dda4ad3f82..3a44513aa0f 100755
--- a/src/Compiler/TypedTree/TypedTreeOps.fsi
+++ b/src/Compiler/TypedTree/TypedTreeOps.fsi
@@ -1079,6 +1079,7 @@ type DisplayEnv =
shortConstraints: bool
useColonForReturnType: bool
showAttributes: bool
+ showCsharpCodeAnalysisAttributes: bool
showOverrides: bool
showStaticallyResolvedTyparAnnotations: bool
showNullnessAnnotations: bool option
diff --git a/src/Compiler/Utilities/sformat.fs b/src/Compiler/Utilities/sformat.fs
index 611c31235d9..55963dbb034 100644
--- a/src/Compiler/Utilities/sformat.fs
+++ b/src/Compiler/Utilities/sformat.fs
@@ -262,6 +262,7 @@ module TaggedText =
let keywordInline = tagKeyword "inline"
let keywordModule = tagKeyword "module"
let keywordNamespace = tagKeyword "namespace"
+ let keywordReturn = tagKeyword "return"
let punctuationUnit = tagPunctuation "()"
#endif
diff --git a/src/Compiler/Utilities/sformat.fsi b/src/Compiler/Utilities/sformat.fsi
index 1c740a38dce..f2ca573d9c4 100644
--- a/src/Compiler/Utilities/sformat.fsi
+++ b/src/Compiler/Utilities/sformat.fsi
@@ -213,6 +213,7 @@ module internal TaggedText =
val internal keywordInline: TaggedText
val internal keywordModule: TaggedText
val internal keywordNamespace: TaggedText
+ val internal keywordReturn: TaggedText
val internal punctuationUnit: TaggedText
type internal IEnvironment =
diff --git a/src/FSharp.Core/array.fs b/src/FSharp.Core/array.fs
index 03aaaf25b49..5ddcd340e68 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) =
diff --git a/src/FSharp.Core/array.fsi b/src/FSharp.Core/array.fsi
index 8947a2a8d07..dd808fd636c 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.fs b/src/FSharp.Core/prim-types.fs
index 211496b99d1..b5bcc6c28ba 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 8b35a81e886..623ed3b0ec7 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
@@ -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 0cdde04516a..faf1784612b 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 15bfe1a8e1d..84ad2986d67 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 f90c9b30e3e..52dde397f29 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 9722633165d..484b653b359 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/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadResolutionUsingFunction.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadResolutionUsingFunction.fs
new file mode 100644
index 00000000000..33560ae9389
--- /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 1bc2d332247..e0b4c824187 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
diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs
index 085027df320..5b9af3c8f20 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 1b121b27766..156d3007ddd 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 574f1695d62..e480a484524 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
@@ -778,6 +766,7 @@ type Foo =
let foo = [Baz 42; Bat; Batman]
printf "%A" foo"""
+ |> withLangVersionPreview
|> asExe
|> compile
|> shouldSucceed
diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs
index fb11a41005d..4611fef33ea 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 248532a1638..028ba300019 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 a86d561c98b..35ed4a6c946 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 7aa8f64ebcb..6b4788a5103 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 9a732ba4a30..2f890a85222 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 4d19bbec2f6..68899c67afe 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 091817ee76d..2fc23ad345b 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 78c95d80d00..abdc6368d11 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 73b97924a42..ae059f40846 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