Skip to content
Open
1 change: 0 additions & 1 deletion src/Compiler/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,6 @@ formatDashItem," - %s"
featureFromEndSlicing,"from-end slicing"
featureNullnessChecking,"nullness checking"
featureRuntimeAsync,"runtime async"
featureWitnessPassing,"witness passing for trait constraints in F# quotations"
featureCSharpExtensionAttributeNotRequired,"Allow implicit Extension attribute on declaring types, modules"
featurePreferExtensionMethodOverPlainProperty,"prefer extension method over plain property"
featureWarningIndexedPropertiesGetSetSameType,"Indexed properties getter and setter must have the same type"
Expand Down
5 changes: 0 additions & 5 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
| NullnessChecking
| UnionIsPropertiesVisible
| CSharpExtensionAttributeNotRequired
Expand Down Expand Up @@ -107,9 +106,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array)
static let features =
dict
[
// F# 5.0
LanguageFeature.WitnessPassing, languageVersion50

// F# 8.0
LanguageFeature.CSharpExtensionAttributeNotRequired, languageVersion80

Expand Down Expand Up @@ -265,7 +261,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.UnionIsPropertiesVisible -> FSComp.SR.featureUnionIsPropertiesVisible ()
| LanguageFeature.CSharpExtensionAttributeNotRequired -> FSComp.SR.featureCSharpExtensionAttributeNotRequired ()
| LanguageFeature.UnmanagedConstraintCsharpInterop -> FSComp.SR.featureUnmanagedConstraintCsharpInterop ()
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
| NullnessChecking
| UnionIsPropertiesVisible
| CSharpExtensionAttributeNotRequired
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 @@ -1849,7 +1849,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.

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

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

Loading