From 850a2ab53b1771592cfbedd23c46cca427edd0d7 Mon Sep 17 00:00:00 2001 From: Copilot Date: Wed, 26 Aug 2026 15:52:00 +0200 Subject: [PATCH] Remove always-on language feature flag LowercaseDUWhenRequireQualifiedAccess (#20170) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/Compiler/Checking/CheckDeclarations.fs | 9 ++------- src/Compiler/FSComp.txt | 1 - src/Compiler/Facilities/LanguageFeatures.fs | 3 --- src/Compiler/Facilities/LanguageFeatures.fsi | 1 - src/Compiler/xlf/FSComp.txt.cs.xlf | 5 ----- src/Compiler/xlf/FSComp.txt.de.xlf | 5 ----- src/Compiler/xlf/FSComp.txt.es.xlf | 5 ----- src/Compiler/xlf/FSComp.txt.fr.xlf | 5 ----- src/Compiler/xlf/FSComp.txt.it.xlf | 5 ----- src/Compiler/xlf/FSComp.txt.ja.xlf | 5 ----- src/Compiler/xlf/FSComp.txt.ko.xlf | 5 ----- src/Compiler/xlf/FSComp.txt.pl.xlf | 5 ----- src/Compiler/xlf/FSComp.txt.pt-BR.xlf | 5 ----- src/Compiler/xlf/FSComp.txt.ru.xlf | 5 ----- src/Compiler/xlf/FSComp.txt.tr.xlf | 5 ----- src/Compiler/xlf/FSComp.txt.zh-Hans.xlf | 5 ----- src/Compiler/xlf/FSComp.txt.zh-Hant.xlf | 5 ----- 17 files changed, 2 insertions(+), 77 deletions(-) diff --git a/src/Compiler/Checking/CheckDeclarations.fs b/src/Compiler/Checking/CheckDeclarations.fs index 24b6cf8fe5f..bef65aa8246 100644 --- a/src/Compiler/Checking/CheckDeclarations.fs +++ b/src/Compiler/Checking/CheckDeclarations.fs @@ -515,13 +515,8 @@ module TcRecdUnionAndEnumDeclarations = CheckNamespaceModuleOrTypeName g id - if g.langVersion.SupportsFeature(LanguageFeature.LowercaseDUWhenRequireQualifiedAccess) then - - if not (String.isLeadingIdentifierCharacterUpperCase name) && not hasRQAAttribute && name <> opNameCons && name <> opNameNil then - errorR(NotUpperCaseConstructorWithoutRQA(id.idRange)) - else - if not (String.isLeadingIdentifierCharacterUpperCase name) && name <> opNameCons && name <> opNameNil then - errorR(NotUpperCaseConstructor(id.idRange)) + if not (String.isLeadingIdentifierCharacterUpperCase name) && not hasRQAAttribute && name <> opNameCons && name <> opNameNil then + errorR(NotUpperCaseConstructorWithoutRQA(id.idRange)) let private CheckUnionDuplicateFields (elems: Ident list) = elems |> List.iteri (fun i (uc1: Ident) -> diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt index f357d733f74..ffa279432b5 100644 --- a/src/Compiler/FSComp.txt +++ b/src/Compiler/FSComp.txt @@ -1578,7 +1578,6 @@ featureErrorOnDeprecatedRequireQualifiedAccess,"give error on deprecated access featureInterfacesWithAbstractStaticMembers,"static abstract interface members" featureSelfTypeConstraints,"self type constraints" featureRequiredProperties,"support for required properties" -featureLowercaseDUWhenRequireQualifiedAccess,"Allow lowercase DU when RequireQualifiedAccess attribute" featureMatchNotAllowedForUnionCaseWithNoData,"Pattern match discard is not allowed for union case that takes no data." featureCSharpExtensionAttributeNotRequired,"Allow implicit Extension attribute on declaring types, modules" featureErrorForNonVirtualMembersOverrides,"Raises errors for non-virtual members overrides" diff --git a/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs index ab6ace19aae..2a001630782 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fs +++ b/src/Compiler/Facilities/LanguageFeatures.fs @@ -38,7 +38,6 @@ type LanguageFeature = | ReallyLongLists | ErrorOnDeprecatedRequireQualifiedAccess | RequiredPropertiesSupport - | LowercaseDUWhenRequireQualifiedAccess | InterfacesWithAbstractStaticMembers | SelfTypeConstraints | MatchNotAllowedForUnionCaseWithNoData @@ -160,7 +159,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array) LanguageFeature.ReallyLongLists, languageVersion70 LanguageFeature.ErrorOnDeprecatedRequireQualifiedAccess, languageVersion70 LanguageFeature.RequiredPropertiesSupport, languageVersion70 - LanguageFeature.LowercaseDUWhenRequireQualifiedAccess, languageVersion70 LanguageFeature.InterfacesWithAbstractStaticMembers, languageVersion70 LanguageFeature.SelfTypeConstraints, languageVersion70 @@ -355,7 +353,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array) | LanguageFeature.ReallyLongLists -> FSComp.SR.featureReallyLongList () | LanguageFeature.ErrorOnDeprecatedRequireQualifiedAccess -> FSComp.SR.featureErrorOnDeprecatedRequireQualifiedAccess () | LanguageFeature.RequiredPropertiesSupport -> FSComp.SR.featureRequiredProperties () - | LanguageFeature.LowercaseDUWhenRequireQualifiedAccess -> FSComp.SR.featureLowercaseDUWhenRequireQualifiedAccess () | LanguageFeature.InterfacesWithAbstractStaticMembers -> FSComp.SR.featureInterfacesWithAbstractStaticMembers () | LanguageFeature.SelfTypeConstraints -> FSComp.SR.featureSelfTypeConstraints () | LanguageFeature.MatchNotAllowedForUnionCaseWithNoData -> FSComp.SR.featureMatchNotAllowedForUnionCaseWithNoData () diff --git a/src/Compiler/Facilities/LanguageFeatures.fsi b/src/Compiler/Facilities/LanguageFeatures.fsi index f19abbb861e..b72da74358d 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fsi +++ b/src/Compiler/Facilities/LanguageFeatures.fsi @@ -28,7 +28,6 @@ type LanguageFeature = | ReallyLongLists | ErrorOnDeprecatedRequireQualifiedAccess | RequiredPropertiesSupport - | LowercaseDUWhenRequireQualifiedAccess | InterfacesWithAbstractStaticMembers | SelfTypeConstraints | MatchNotAllowedForUnionCaseWithNoData diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf index dc4782c9ed4..aaceaeb145a 100644 --- a/src/Compiler/xlf/FSComp.txt.cs.xlf +++ b/src/Compiler/xlf/FSComp.txt.cs.xlf @@ -492,11 +492,6 @@ Lowers [for x in xs -> f x] and [|for x in xs -> f x|] to fast loops when xs is a list or an array, respectively. - - Allow lowercase DU when RequireQualifiedAccess attribute - Povolit duplikát malými písmeny při atributu RequireQualifiedAccess - - Pattern match discard is not allowed for union case that takes no data. Zahození shody vzoru není povolené pro případ sjednocení, který nepřijímá žádná data. diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf index 4cb29a257b1..a34f637cfc3 100644 --- a/src/Compiler/xlf/FSComp.txt.de.xlf +++ b/src/Compiler/xlf/FSComp.txt.de.xlf @@ -492,11 +492,6 @@ Lowers [for x in xs -> f x] and [|for x in xs -> f x|] to fast loops when xs is a list or an array, respectively. - - Allow lowercase DU when RequireQualifiedAccess attribute - DU in Kleinbuchstaben zulassen, wenn requireQualifiedAccess-Attribut - - Pattern match discard is not allowed for union case that takes no data. Das Verwerfen von Musterübereinstimmungen ist für einen Union-Fall, der keine Daten akzeptiert, nicht zulässig. diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf index 3c9a547190c..331e472c51b 100644 --- a/src/Compiler/xlf/FSComp.txt.es.xlf +++ b/src/Compiler/xlf/FSComp.txt.es.xlf @@ -492,11 +492,6 @@ Lowers [for x in xs -> f x] and [|for x in xs -> f x|] to fast loops when xs is a list or an array, respectively. - - Allow lowercase DU when RequireQualifiedAccess attribute - Permitir DU en minúsculas con el atributo RequireQualifiedAccess - - Pattern match discard is not allowed for union case that takes no data. No se permite el descarte de coincidencia de patrón para un caso de unión que no tome datos. diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf index 4fa634e0bf4..e84cd4f6362 100644 --- a/src/Compiler/xlf/FSComp.txt.fr.xlf +++ b/src/Compiler/xlf/FSComp.txt.fr.xlf @@ -492,11 +492,6 @@ Lowers [for x in xs -> f x] and [|for x in xs -> f x|] to fast loops when xs is a list or an array, respectively. - - Allow lowercase DU when RequireQualifiedAccess attribute - Autoriser les DU en minuscules pour l'attribut RequireQualifiedAccess - - Pattern match discard is not allowed for union case that takes no data. L’abandon des correspondances de modèle n’est pas autorisé pour un cas d’union qui n’accepte aucune donnée. diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf index 847a812bca6..a7b1ad06a3e 100644 --- a/src/Compiler/xlf/FSComp.txt.it.xlf +++ b/src/Compiler/xlf/FSComp.txt.it.xlf @@ -492,11 +492,6 @@ Lowers [for x in xs -> f x] and [|for x in xs -> f x|] to fast loops when xs is a list or an array, respectively. - - Allow lowercase DU when RequireQualifiedAccess attribute - Consentire l’unione discriminata minuscola quando l'attributo RequireQualifiedAccess - - Pattern match discard is not allowed for union case that takes no data. L'eliminazione della corrispondenza dei criteri non è consentita per case di unione che non accetta dati. diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf index 1984f24be07..2930654845c 100644 --- a/src/Compiler/xlf/FSComp.txt.ja.xlf +++ b/src/Compiler/xlf/FSComp.txt.ja.xlf @@ -492,11 +492,6 @@ Lowers [for x in xs -> f x] and [|for x in xs -> f x|] to fast loops when xs is a list or an array, respectively. - - Allow lowercase DU when RequireQualifiedAccess attribute - RequireQualifiedAccess 属性の場合に小文字 DU を許可する - - Pattern match discard is not allowed for union case that takes no data. データを受け取らない共用体ケースでは、パターン一致の破棄は許可されません。 diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf index 1c926d2f636..3a8ff03b5c6 100644 --- a/src/Compiler/xlf/FSComp.txt.ko.xlf +++ b/src/Compiler/xlf/FSComp.txt.ko.xlf @@ -492,11 +492,6 @@ Lowers [for x in xs -> f x] and [|for x in xs -> f x|] to fast loops when xs is a list or an array, respectively. - - Allow lowercase DU when RequireQualifiedAccess attribute - RequireQualifiedAccess 특성이 있는 경우 소문자 DU 허용 - - Pattern match discard is not allowed for union case that takes no data. 데이터를 사용하지 않는 공용 구조체 사례에는 패턴 일치 삭제가 허용되지 않습니다. diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf index 184e743f9ab..037bc3d176a 100644 --- a/src/Compiler/xlf/FSComp.txt.pl.xlf +++ b/src/Compiler/xlf/FSComp.txt.pl.xlf @@ -492,11 +492,6 @@ Lowers [for x in xs -> f x] and [|for x in xs -> f x|] to fast loops when xs is a list or an array, respectively. - - Allow lowercase DU when RequireQualifiedAccess attribute - Zezwalaj na małą literę DU, gdy występuje RequireQualifiedAccess - - Pattern match discard is not allowed for union case that takes no data. Odrzucenie dopasowania wzorca jest niedozwolone w przypadku unii, która nie pobiera żadnych danych. diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf index d45561696cc..9515f5e4f40 100644 --- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf +++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf @@ -492,11 +492,6 @@ Lowers [for x in xs -> f x] and [|for x in xs -> f x|] to fast loops when xs is a list or an array, respectively. - - Allow lowercase DU when RequireQualifiedAccess attribute - Permitir DU em minúsculas quando o atributo RequireQualifiedAccess - - Pattern match discard is not allowed for union case that takes no data. O descarte de correspondência de padrão não é permitido para casos união que não aceitam dados. diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf index a354c753312..2673c7b832d 100644 --- a/src/Compiler/xlf/FSComp.txt.ru.xlf +++ b/src/Compiler/xlf/FSComp.txt.ru.xlf @@ -492,11 +492,6 @@ Lowers [for x in xs -> f x] and [|for x in xs -> f x|] to fast loops when xs is a list or an array, respectively. - - Allow lowercase DU when RequireQualifiedAccess attribute - Разрешить du в нижнем регистре, если атрибут RequireQualifiedAccess - - Pattern match discard is not allowed for union case that takes no data. Отмена сопоставления с шаблоном не разрешена для случая объединения, не принимающего данные. diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf index 8eee8e0f00b..4b6b940221e 100644 --- a/src/Compiler/xlf/FSComp.txt.tr.xlf +++ b/src/Compiler/xlf/FSComp.txt.tr.xlf @@ -492,11 +492,6 @@ Lowers [for x in xs -> f x] and [|for x in xs -> f x|] to fast loops when xs is a list or an array, respectively. - - Allow lowercase DU when RequireQualifiedAccess attribute - RequireQualifiedAccess özniteliğinde küçük harf DU'ya izin ver - - Pattern match discard is not allowed for union case that takes no data. Veri almayan birleşim durumu için desen eşleştirme atma kullanılamaz. diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf index 8b416bf6648..40c85611d44 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf @@ -492,11 +492,6 @@ Lowers [for x in xs -> f x] and [|for x in xs -> f x|] to fast loops when xs is a list or an array, respectively. - - Allow lowercase DU when RequireQualifiedAccess attribute - 当 RequireQualifiedAccess 属性时允许小写 DU - - Pattern match discard is not allowed for union case that takes no data. 不允许将模式匹配丢弃用于不采用数据的联合事例。 diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf index c8848815e00..aa3abfb2554 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf @@ -492,11 +492,6 @@ Lowers [for x in xs -> f x] and [|for x in xs -> f x|] to fast loops when xs is a list or an array, respectively. - - Allow lowercase DU when RequireQualifiedAccess attribute - RequireQualifiedAccess 屬性時允許小寫 DU - - Pattern match discard is not allowed for union case that takes no data. 不接受資料的聯集案例不允許模式比對捨棄。