Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Compiler/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,6 @@ featureFromEndSlicing,"from-end slicing"
featureNullnessChecking,"nullness checking"
featureRuntimeAsync,"runtime async"
featureStringInterpolation,"string interpolation"
featureWitnessPassing,"witness passing for trait constraints in F# quotations"
featureReallyLongList,"list literals of any size"
featureErrorOnDeprecatedRequireQualifiedAccess,"give error on deprecated access of construct with RequireQualifiedAccess attribute"
featureMatchNotAllowedForUnionCaseWithNoData,"Pattern match discard is not allowed for union case that takes no data."
Expand Down
3 changes: 0 additions & 3 deletions src/Compiler/Facilities/LanguageFeatures.fs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module internal FSharp.Compiler.Features
type LanguageFeature =
| FromEndSlicing
| RuntimeAsync
| WitnessPassing
| StringInterpolation
| ExpandedMeasurables
| NullnessChecking
Expand Down Expand Up @@ -119,7 +118,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array)
dict
[
// F# 5.0
LanguageFeature.WitnessPassing, languageVersion50
LanguageFeature.StringInterpolation, languageVersion50

// F# 6.0
Expand Down Expand Up @@ -291,7 +289,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array)
| LanguageFeature.FromEndSlicing -> FSComp.SR.featureFromEndSlicing ()
| LanguageFeature.NullnessChecking -> FSComp.SR.featureNullnessChecking ()
| LanguageFeature.RuntimeAsync -> FSComp.SR.featureRuntimeAsync ()
| LanguageFeature.WitnessPassing -> FSComp.SR.featureWitnessPassing ()
| LanguageFeature.StringInterpolation -> FSComp.SR.featureStringInterpolation ()
| LanguageFeature.ExpandedMeasurables -> FSComp.SR.featureExpandedMeasurables ()
| LanguageFeature.UnionIsPropertiesVisible -> FSComp.SR.featureUnionIsPropertiesVisible ()
Expand Down
1 change: 0 additions & 1 deletion src/Compiler/Facilities/LanguageFeatures.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module internal FSharp.Compiler.Features
type LanguageFeature =
| FromEndSlicing
| RuntimeAsync
| WitnessPassing
| StringInterpolation
| ExpandedMeasurables
| NullnessChecking
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Symbols/Exprs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ module FSharpExprConvert =

and GetWitnessArgs cenv (env: ExprTranslationEnv) (vref: ValRef) m tps tyargs : FSharpExpr list =
let g = cenv.g
if g.langVersion.SupportsFeature(Features.LanguageFeature.WitnessPassing) && not env.suppressWitnesses then
if not env.suppressWitnesses then
/// There are two *conditional* properties a typar can have: equality and comparison.
/// A generic type having that constraint may be conditional on whether a specific type parameter to that generic has that
/// constraint.
Expand Down
1 change: 0 additions & 1 deletion src/Compiler/Symbols/Symbols.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2903,7 +2903,6 @@ type FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
| E _ | P _ | M _ | C _ -> []
match witnessInfos with
| [] -> None
| _ when not (cenv.g.langVersion.SupportsFeature(Features.LanguageFeature.WitnessPassing)) -> None
| _ ->
let witnessParams =
((Set.empty, 0), witnessInfos) ||> List.mapFold (fun (used,i) witnessInfo ->
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/TypedTree/TcGlobals.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,7 @@ type TcGlobals(
/// supports witness arguments.
member g.generateWitnesses =
compilingFSharpCore ||
((ValRefForIntrinsic g.call_with_witnesses_info).TryDeref.IsSome && langVersion.SupportsFeature LanguageFeature.WitnessPassing)
(ValRefForIntrinsic g.call_with_witnesses_info).TryDeref.IsSome

/// Indicates if we can use System.Array.Empty when emitting IL for empty array literals
member val isArrayEmptyAvailable = v_Array_tcref.ILTyconRawMetadata.Methods.FindByName "Empty" |> List.isEmpty |> not
Expand Down
9 changes: 4 additions & 5 deletions src/Compiler/TypedTree/TypedTreeOps.Transforms.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1022,16 +1022,15 @@ module internal Rewriting =
remapTyconToNonLocal ctxt tmenv x

(* Which constraints actually get compiled to .NET constraints? *)
let isCompiledOrWitnessPassingConstraint (g: TcGlobals) cx =
let isCompiledOrWitnessPassingConstraint cx =
match cx with
| TyparConstraint.SupportsNull _ // this implies the 'class' constraint
| TyparConstraint.IsReferenceType _ // this is the 'class' constraint
| TyparConstraint.IsNonNullableStruct _
| TyparConstraint.IsReferenceType _
| TyparConstraint.RequiresDefaultConstructor _
| TyparConstraint.IsUnmanaged _ // implies "struct" and also causes a modreq
| TyparConstraint.CoercesTo _ -> true
| TyparConstraint.MayResolveMember _ when g.langVersion.SupportsFeature LanguageFeature.WitnessPassing -> true
| TyparConstraint.CoercesTo _
| TyparConstraint.MayResolveMember _ -> true
| _ -> false

// Is a value a first-class polymorphic value with .NET constraints, or witness-passing constraints?
Expand All @@ -1042,7 +1041,7 @@ module internal Rewriting =
&& v.Type
|> destForallTy g
|> fst
|> List.exists (fun tp -> HasConstraint (isCompiledOrWitnessPassingConstraint g) tp)
|> List.exists (HasConstraint isCompiledOrWitnessPassingConstraint)

// Does a type support a given interface?
type Entity with
Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/xlf/FSComp.txt.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/Compiler/xlf/FSComp.txt.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/Compiler/xlf/FSComp.txt.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/Compiler/xlf/FSComp.txt.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/Compiler/xlf/FSComp.txt.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/Compiler/xlf/FSComp.txt.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/Compiler/xlf/FSComp.txt.ko.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/Compiler/xlf/FSComp.txt.pl.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/Compiler/xlf/FSComp.txt.pt-BR.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/Compiler/xlf/FSComp.txt.ru.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/Compiler/xlf/FSComp.txt.tr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/Compiler/xlf/FSComp.txt.zh-Hans.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading