diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt
index 1b165d24677..524fe9a6593 100644
--- a/src/Compiler/FSComp.txt
+++ b/src/Compiler/FSComp.txt
@@ -1554,7 +1554,6 @@ formatDashItem," - %s"
featureFromEndSlicing,"from-end slicing"
featureNullnessChecking,"nullness checking"
featureRuntimeAsync,"runtime async"
-featureWitnessPassing,"witness passing for trait constraints in F# quotations"
featureErrorOnDeprecatedRequireQualifiedAccess,"give error on deprecated access of construct with RequireQualifiedAccess attribute"
featureCSharpExtensionAttributeNotRequired,"Allow implicit Extension attribute on declaring types, modules"
featureWarningWhenCopyAndUpdateRecordChangesAllFields,"Raises warnings when an copy-and-update record expression changes all fields of a record."
diff --git a/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs
index b81587bc166..0146a9d0545 100644
--- a/src/Compiler/Facilities/LanguageFeatures.fs
+++ b/src/Compiler/Facilities/LanguageFeatures.fs
@@ -18,7 +18,6 @@ module internal FSharp.Compiler.Features
type LanguageFeature =
| FromEndSlicing
| RuntimeAsync
- | WitnessPassing
| ExpandedMeasurables
| NullnessChecking
| UnionIsPropertiesVisible
@@ -112,9 +111,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array)
static let features =
dict
[
- // F# 5.0
- LanguageFeature.WitnessPassing, languageVersion50
-
// F# 6.0
LanguageFeature.ExpandedMeasurables, languageVersion60
LanguageFeature.AttributesToRightOfModuleKeyword, languageVersion60
@@ -279,7 +275,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.ExpandedMeasurables -> FSComp.SR.featureExpandedMeasurables ()
| LanguageFeature.UnionIsPropertiesVisible -> FSComp.SR.featureUnionIsPropertiesVisible ()
| LanguageFeature.AttributesToRightOfModuleKeyword -> FSComp.SR.featureAttributesToRightOfModuleKeyword ()
diff --git a/src/Compiler/Facilities/LanguageFeatures.fsi b/src/Compiler/Facilities/LanguageFeatures.fsi
index 3d916debab3..b267b8b2185 100644
--- a/src/Compiler/Facilities/LanguageFeatures.fsi
+++ b/src/Compiler/Facilities/LanguageFeatures.fsi
@@ -8,7 +8,6 @@ module internal FSharp.Compiler.Features
type LanguageFeature =
| FromEndSlicing
| RuntimeAsync
- | WitnessPassing
| ExpandedMeasurables
| NullnessChecking
| UnionIsPropertiesVisible
diff --git a/src/Compiler/Symbols/Exprs.fs b/src/Compiler/Symbols/Exprs.fs
index 10436b7eed1..443980eae49 100644
--- a/src/Compiler/Symbols/Exprs.fs
+++ b/src/Compiler/Symbols/Exprs.fs
@@ -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.
diff --git a/src/Compiler/Symbols/Symbols.fs b/src/Compiler/Symbols/Symbols.fs
index ae5c266cff5..234d4e56edc 100644
--- a/src/Compiler/Symbols/Symbols.fs
+++ b/src/Compiler/Symbols/Symbols.fs
@@ -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 ->
diff --git a/src/Compiler/TypedTree/TcGlobals.fs b/src/Compiler/TypedTree/TcGlobals.fs
index adf0d4a7ea9..1011256240f 100644
--- a/src/Compiler/TypedTree/TcGlobals.fs
+++ b/src/Compiler/TypedTree/TcGlobals.fs
@@ -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
diff --git a/src/Compiler/TypedTree/TypedTreeOps.Transforms.fs b/src/Compiler/TypedTree/TypedTreeOps.Transforms.fs
index 7ee5f290b23..59292819942 100644
--- a/src/Compiler/TypedTree/TypedTreeOps.Transforms.fs
+++ b/src/Compiler/TypedTree/TypedTreeOps.Transforms.fs
@@ -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?
@@ -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
diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf
index 31088e5c8ec..cbd0a825211 100644
--- a/src/Compiler/xlf/FSComp.txt.cs.xlf
+++ b/src/Compiler/xlf/FSComp.txt.cs.xlf
@@ -562,11 +562,6 @@
Vyvolá upozornění, pokud bylo během překladu názvů nalezeno více shod typu záznamu z důvodu překrývajících se názvů polí.
-
- witness passing for trait constraints in F# quotations
- Předávání kopie clusteru pro omezení vlastností v uvozovkách v jazyce F#
-
- All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length {0} of type\n {1} \nThis branch returns a tuple of length {2} of type\n {3} \nVšechny větve výrazu shody vzoru musí vracet hodnoty implicitně převoditelné na typ první větve, což je řazená kolekce členů o délce {0} typu\n {1} \nTato větev vrací řazenou kolekci členů o délce {2} typu\n {3} \n
diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf
index 90c2ed0f2e1..c963d146357 100644
--- a/src/Compiler/xlf/FSComp.txt.de.xlf
+++ b/src/Compiler/xlf/FSComp.txt.de.xlf
@@ -562,11 +562,6 @@
Löst Warnungen aus, wenn bei der Namensauflösung aufgrund überlappender Feldnamen mehrere Datensatztypüberstimmungen gefunden wurden.
-
- witness passing for trait constraints in F# quotations
- Zeugenübergabe für Merkmalseinschränkungen in F#-Zitaten
-
- All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length {0} of type\n {1} \nThis branch returns a tuple of length {2} of type\n {3} \nAlle Verzweigungen eines Musterübereinstimmungsausdrucks müssen Werte zurückgeben, die implizit in den Typ der ersten Verzweigung konvertierbar sind. In diesem Fall handelt es sich dabei um ein Tupel der Länge {0} des Typs.\n {1} \nDiese Verzweigung gibt ein Tupel der Länge {2} des Typs\n {3} \nzurück.
diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf
index fff6f88b1e7..6ab182294ba 100644
--- a/src/Compiler/xlf/FSComp.txt.es.xlf
+++ b/src/Compiler/xlf/FSComp.txt.es.xlf
@@ -562,11 +562,6 @@
Genera advertencias cuando se encontraron varias coincidencias de tipo de registro durante la resolución de nombres debido a nombres de campo superpuestos.
-
- witness passing for trait constraints in F# quotations
- Paso de testigo para las restricciones de rasgos en las expresiones de código delimitadas de F#
-
- All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length {0} of type\n {1} \nThis branch returns a tuple of length {2} of type\n {3} \nTodas las ramas de una expresión de coincidencia de patrón deben devolver valores implícitamente convertibles al tipo de la primera rama, que aquí es una tupla de longitud {0} de tipo\n {1} \nEsta rama devuelve una tupla de longitud {2} de tipo\n {3} \n
diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf
index d5241f0d027..e2bf51246b7 100644
--- a/src/Compiler/xlf/FSComp.txt.fr.xlf
+++ b/src/Compiler/xlf/FSComp.txt.fr.xlf
@@ -562,11 +562,6 @@
Déclenche des avertissements lorsque plusieurs correspondances de types d'enregistrement ont été trouvées lors de la résolution de nom en raison de noms de champs qui se chevauchent.
-
- witness passing for trait constraints in F# quotations
- Passage de témoin pour les contraintes de trait dans les quotations F#
-
- All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length {0} of type\n {1} \nThis branch returns a tuple of length {2} of type\n {3} \nToutes les branches d’une expression de correspondance de motifs doivent retourner des valeurs implicitement convertibles au type de la première branche, qui est ici un tuple de longueur {0} de type\n {1} \nCette branche renvoie un tuple de longueur {2} de type\n {3} \n
diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf
index 08a9cb62242..8c452fc2eed 100644
--- a/src/Compiler/xlf/FSComp.txt.it.xlf
+++ b/src/Compiler/xlf/FSComp.txt.it.xlf
@@ -562,11 +562,6 @@
Genera avvisi quando sono state trovate più corrispondenze del tipo di record durante la risoluzione dei nomi a causa di nomi di campi sovrapposti.
-
- witness passing for trait constraints in F# quotations
- Passaggio del testimone per vincoli di tratto in quotation F#
-
- All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length {0} of type\n {1} \nThis branch returns a tuple of length {2} of type\n {3} \nTutti i rami di un'espressione di corrispondenza criterio devono restituire valori convertibili in modo implicito nel tipo del primo ramo, che è una tupla di lunghezza {0} di tipo\n {1} \nQuesto ramo restituisce una tupla di lunghezza {2} di tipo\n {3} \n
diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf
index 3504e4be31d..b9203975d06 100644
--- a/src/Compiler/xlf/FSComp.txt.ja.xlf
+++ b/src/Compiler/xlf/FSComp.txt.ja.xlf
@@ -562,11 +562,6 @@
フィールド名が重複しているため、名前解決中に複数のレコードの種類の一致が見つかった場合に警告を生成します。
-
- witness passing for trait constraints in F# quotations
- F# 引用での特性制約に対する監視の引き渡し
-
- All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length {0} of type\n {1} \nThis branch returns a tuple of length {2} of type\n {3} \nパターン一致のすべての分岐は、最初の分岐の型に暗黙的に変換できる値を返す必要があります。これは、型の長さ {0} のタプルです\n {1} \nこの分岐は、型の長さ {2} のタプルを返します\n {3} \n
diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf
index be0535fa683..2f0bb6b6ad3 100644
--- a/src/Compiler/xlf/FSComp.txt.ko.xlf
+++ b/src/Compiler/xlf/FSComp.txt.ko.xlf
@@ -562,11 +562,6 @@
필드 이름이 겹치므로 이름 확인 중에 레코드 유형 일치가 여러 개 발견되면 경고가 발생합니다.
-
- witness passing for trait constraints in F# quotations
- F# 인용의 특성 제약 조건에 대한 감시 전달
-
- All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length {0} of type\n {1} \nThis branch returns a tuple of length {2} of type\n {3} \n패턴 일치 식의 모든 분기는 첫 번째 분기의 유형으로 암시적으로 변환 가능한 값을 반환해야 합니다. 여기서는 형식이 \n {1}이고 길이가 {0}인 튜플입니다. \n이 분기는 형식이 \n {3}이고 길이가 {2}인 튜플을 반환합니다. \n
diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf
index 968fd35e22a..b2759c07d44 100644
--- a/src/Compiler/xlf/FSComp.txt.pl.xlf
+++ b/src/Compiler/xlf/FSComp.txt.pl.xlf
@@ -562,11 +562,6 @@
Zgłasza ostrzeżenia, gdy znaleziono wiele dopasowań typów rekordów podczas rozpoznawania nazw z powodu nakładających się nazw pól.
-
- witness passing for trait constraints in F# quotations
- monitor, który przekazuje ograniczenia cech języka F#
-
- All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length {0} of type\n {1} \nThis branch returns a tuple of length {2} of type\n {3} \nWszystkie gałęzie wyrażenia dopasowania wzorca muszą zwracać wartości niejawnie konwertowalne na typ pierwszej gałęzi, oto krotka o długości {0} typu\n {1} \nTa Gałąź zwraca krotki o długości {2} typu\n {3} \n
diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf
index 7af6380f339..196fb5df2d9 100644
--- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf
+++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf
@@ -562,11 +562,6 @@
Gera avisos quando várias correspondências de tipo de registro foram encontradas durante a resolução de nomes devido à sobreposição de nomes de campo.
-
- witness passing for trait constraints in F# quotations
- Passagem de testemunha para restrições de característica nas citações do F#
-
- All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length {0} of type\n {1} \nThis branch returns a tuple of length {2} of type\n {3} \nTodas as ramificações de uma expressão de correspondência de padrão devem retornar valores implicitamente conversíveis ao tipo da primeira ramificação, que aqui é uma tupla de comprimento {0} do tipo\n {1} \nEsta ramificação retorna uma tupla de comprimento {2} do tipo\n {3} \n
diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf
index e2d791c3e16..ba56bfe6ebd 100644
--- a/src/Compiler/xlf/FSComp.txt.ru.xlf
+++ b/src/Compiler/xlf/FSComp.txt.ru.xlf
@@ -562,11 +562,6 @@
Выдает предупреждения, когда при разрешении имен обнаружено несколько совпадений типов записи из-за перекрывающихся имен полей.
-
- witness passing for trait constraints in F# quotations
- Передача свидетеля для ограничений признаков в цитированиях F#
-
- All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length {0} of type\n {1} \nThis branch returns a tuple of length {2} of type\n {3} \nВсе ветви выражения сопоставления с шаблоном должны возвращать значения, поддерживающие неявное преобразование в тип первой ветви, которым здесь является кортеж длиной {0} типа\n {1} \nЭта ветвь возвращает кортеж длиной {2} типа\n {3} \n
diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf
index 3d95a3023ef..2a6ccf1a65f 100644
--- a/src/Compiler/xlf/FSComp.txt.tr.xlf
+++ b/src/Compiler/xlf/FSComp.txt.tr.xlf
@@ -562,11 +562,6 @@
Çakışan alan adları nedeniyle, ad çözümlemesi sırasında birden çok kayıt türü eşleşmesi olduğunda uyarı verir.
-
- witness passing for trait constraints in F# quotations
- F# alıntılarındaki nitelik kısıtlamaları için tanık geçirme
-
- All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length {0} of type\n {1} \nThis branch returns a tuple of length {2} of type\n {3} \nBir desen eşleştirme ifadesinin tüm dalları, örtük olarak ilk dalın türüne dönüştürülebilir değerler döndürmelidir. Burada ilk dal {0} uzunluğunda türü\n {1} olan bir demet \nBu dal {2} uzunluğunda türü\n {3} \nolan bir demet döndürüyor
diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf
index 02abd3f9497..2fff14d97ae 100644
--- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf
+++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf
@@ -562,11 +562,6 @@
在名称解析期间由于字段名称重叠而找到多个记录类型匹配项时引发警告。
-
- witness passing for trait constraints in F# quotations
- F# 引号中特征约束的见证传递
-
- All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length {0} of type\n {1} \nThis branch returns a tuple of length {2} of type\n {3} \n模式匹配表达式的所有分支必须返回可隐式转换为第一个分支类型的值,这是一个长度为 {0} 的类型的元组\n {1} \n此分支会返回长度为 {2} 的类型的元组\n {3} \n
diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf
index 22f36f05659..89b896fe66e 100644
--- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf
+++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf
@@ -562,11 +562,6 @@
在名稱解析期間由於欄位名稱重疊而找到多個記錄類型相符項目時引發警告。
-
- witness passing for trait constraints in F# quotations
- 見證 F# 引號中特徵條件約束的傳遞
-
- All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length {0} of type\n {1} \nThis branch returns a tuple of length {2} of type\n {3} \n模式比對運算式的所有分支都傳回可隱含轉換為第一個分支的類型的值,這是類型為\n {1} \n的元組長度 {0}此分支傳回的是類型為\n {3} \n的元組長度 {2}