diff --git a/src/Compiler/Checking/CheckIncrementalClasses.fs b/src/Compiler/Checking/CheckIncrementalClasses.fs index a6513de2856..3f7d6cea893 100644 --- a/src/Compiler/Checking/CheckIncrementalClasses.fs +++ b/src/Compiler/Checking/CheckIncrementalClasses.fs @@ -104,7 +104,7 @@ let TcStaticImplicitCtorInfo_Phase2A(cenv: cenv, env, tcref: TyconRef, m, copyOf let cctorTy = mkFunTy g g.unit_ty g.unit_ty let valSynData = SynValInfo([[]], SynInfo.unnamedRetVal) let id = ident ("cctor", m) - CheckForNonAbstractInterface g ModuleOrMemberBinding tcref ClassCtorMemberFlags false id.idRange + CheckForNonAbstractInterface ModuleOrMemberBinding tcref ClassCtorMemberFlags false id.idRange let memberInfo = MakeMemberDataAndMangledNameForMemberVal(g, tcref, false, [], [], ClassCtorMemberFlags, valSynData, id, false) let prelimValReprInfo = TranslateSynValInfo cenv m (TcAttributes cenv env) valSynData let prelimTyschemeG = GeneralizedType(copyOfTyconTypars, cctorTy) @@ -192,7 +192,7 @@ let TcImplicitCtorInfo_Phase2A(cenv: cenv, env, tpenv, tcref: TyconRef, vis, att let valSynData = SynValInfo([synArgInfos], SynInfo.unnamedRetVal) let id = ident ("new", m) - CheckForNonAbstractInterface g ModuleOrMemberBinding tcref memberFlags false id.idRange + CheckForNonAbstractInterface ModuleOrMemberBinding tcref memberFlags false id.idRange let memberInfo = MakeMemberDataAndMangledNameForMemberVal(g, tcref, false, attribs, [], memberFlags, valSynData, id, false) let prelimValReprInfo = TranslateSynValInfo cenv m (TcAttributes cenv env) valSynData let prelimTyschemeG = GeneralizedType(copyOfTyconTypars, ctorTy) diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index ff34ea0ae34..5712058a708 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -12556,7 +12556,7 @@ and ApplyAbstractSlotInference (cenv: cenv) (envinner: TcEnv) (_: Val option) (a [], declaredTypars -and CheckForNonAbstractInterface (g: TcGlobals) declKind tcref (memberFlags: SynMemberFlags) isMemberStatic m = +and CheckForNonAbstractInterface declKind tcref (memberFlags: SynMemberFlags) isMemberStatic m = if isInterfaceTyconRef tcref then if memberFlags.MemberKind = SynMemberKind.ClassConstructor then error(Error(FSComp.SR.tcStaticInitializersIllegalInInterface(), m)) @@ -12564,11 +12564,8 @@ and CheckForNonAbstractInterface (g: TcGlobals) declKind tcref (memberFlags: Syn error(Error(FSComp.SR.tcObjectConstructorsIllegalInInterface(), m)) elif memberFlags.IsOverrideOrExplicitImpl then error(Error(FSComp.SR.tcMemberOverridesIllegalInInterface(), m)) - elif not (declKind = ExtrinsicExtensionBinding || memberFlags.IsDispatchSlot) then - if not isMemberStatic then - error(Error(FSComp.SR.tcConcreteMembersIllegalInInterface(), m)) - else - checkLanguageFeatureAndRecover g.langVersion LanguageFeature.StaticMembersInInterfaces m + elif not (declKind = ExtrinsicExtensionBinding || memberFlags.IsDispatchSlot) && not isMemberStatic then + error(Error(FSComp.SR.tcConcreteMembersIllegalInInterface(), m)) //------------------------------------------------------------------------- // TcLetrecBindings - AnalyzeAndMakeAndPublishRecursiveValue s @@ -12614,7 +12611,7 @@ and AnalyzeRecursiveStaticMemberOrValDecl memberFlags.IsOverrideOrExplicitImpl -> CheckMemberFlags intfSlotTyOpt newslotsOK overridesOK memberFlags id.idRange - CheckForNonAbstractInterface g declKind tcref memberFlags true id.idRange + CheckForNonAbstractInterface declKind tcref memberFlags true id.idRange let isExtrinsic = (declKind = ExtrinsicExtensionBinding) let tcrefObjTy, enclosingDeclaredTypars, renaming, _, _ = FreshenObjectArgType cenv envinner.TraitContext mBinding TyparRigidity.WillBeRigid tcref isExtrinsic declaredTyconTypars @@ -12636,7 +12633,7 @@ and AnalyzeRecursiveStaticMemberOrValDecl assert (Option.isNone intfSlotTyOpt) CheckMemberFlags None newslotsOK overridesOK memberFlags id.idRange - CheckForNonAbstractInterface g declKind tcref memberFlags true id.idRange + CheckForNonAbstractInterface declKind tcref memberFlags true id.idRange if memberFlags.MemberKind = SynMemberKind.Constructor && tcref.Deref.IsFSharpException then error(Error(FSComp.SR.tcConstructorsDisallowedInExceptionAugmentation(), id.idRange)) @@ -12741,7 +12738,7 @@ and AnalyzeRecursiveInstanceMemberDecl let argsAndRetTy = NewInferenceType g UnifyTypes cenv envinner mBinding ty (mkFunTy g thisTy argsAndRetTy) - CheckForNonAbstractInterface g declKind tcref memberFlags false memberId.idRange + CheckForNonAbstractInterface declKind tcref memberFlags false memberId.idRange // Determine if a uniquely-identified-override exists based on the information // at the member signature. If so, we know the type of this member, and the full slotsig diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fsi b/src/Compiler/Checking/Expressions/CheckExpressions.fsi index 5e4ef62aedd..898fb8c7cba 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fsi +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fsi @@ -407,13 +407,7 @@ val AnalyzeAndMakeAndPublishRecursiveValue: /// Check that a member can be included in an interface val CheckForNonAbstractInterface: - g: TcGlobals -> - declKind: DeclKind -> - tcref: TyconRef -> - memberFlags: SynMemberFlags -> - isMemberStatic: bool -> - m: range -> - unit + declKind: DeclKind -> tcref: TyconRef -> memberFlags: SynMemberFlags -> isMemberStatic: bool -> m: range -> unit /// Check the flags on a member definition for consistency val CheckMemberFlags: diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt index 29d13df0cd0..b1d49cd80b6 100644 --- a/src/Compiler/FSComp.txt +++ b/src/Compiler/FSComp.txt @@ -1582,7 +1582,6 @@ featureErrorForNonVirtualMembersOverrides,"Raises errors for non-virtual members featureArithmeticInLiterals,"Arithmetic and logical operations in literals, enum definitions and attributes" featureErrorReportingOnStaticClasses,"Error reporting on static classes" featureWarningWhenCopyAndUpdateRecordChangesAllFields,"Raises warnings when an copy-and-update record expression changes all fields of a record." -featureStaticMembersInInterfaces,"Static members in interfaces" featureNonInlineLiteralsAsPrintfFormat,"String values marked as literals and IL constants as printf format" featureExtendedStringInterpolation,"Extended string interpolation similar to C# raw string literals." featureWarningWhenMultipleRecdTypeChoice,"Raises warnings when multiple record type matches were found during name resolution because of overlapping field names." diff --git a/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs index 97239a6a940..2aa423a66e7 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fs +++ b/src/Compiler/Facilities/LanguageFeatures.fs @@ -47,7 +47,6 @@ type LanguageFeature = | ArithmeticInLiterals | ErrorReportingOnStaticClasses | WarningWhenCopyAndUpdateRecordChangesAllFields - | StaticMembersInInterfaces | NonInlineLiteralsAsPrintfFormat | ExtendedStringInterpolation | WarningWhenMultipleRecdTypeChoice @@ -171,7 +170,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array) LanguageFeature.ArithmeticInLiterals, languageVersion80 LanguageFeature.ErrorReportingOnStaticClasses, languageVersion80 LanguageFeature.WarningWhenCopyAndUpdateRecordChangesAllFields, languageVersion80 - LanguageFeature.StaticMembersInInterfaces, languageVersion80 LanguageFeature.NonInlineLiteralsAsPrintfFormat, languageVersion80 LanguageFeature.ExtendedStringInterpolation, languageVersion80 LanguageFeature.WarningWhenMultipleRecdTypeChoice, languageVersion80 @@ -360,7 +358,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array) | LanguageFeature.ErrorReportingOnStaticClasses -> FSComp.SR.featureErrorReportingOnStaticClasses () | LanguageFeature.WarningWhenCopyAndUpdateRecordChangesAllFields -> FSComp.SR.featureWarningWhenCopyAndUpdateRecordChangesAllFields () - | LanguageFeature.StaticMembersInInterfaces -> FSComp.SR.featureStaticMembersInInterfaces () | LanguageFeature.NonInlineLiteralsAsPrintfFormat -> FSComp.SR.featureNonInlineLiteralsAsPrintfFormat () | LanguageFeature.ExtendedStringInterpolation -> FSComp.SR.featureExtendedStringInterpolation () | LanguageFeature.WarningWhenMultipleRecdTypeChoice -> FSComp.SR.featureWarningWhenMultipleRecdTypeChoice () diff --git a/src/Compiler/Facilities/LanguageFeatures.fsi b/src/Compiler/Facilities/LanguageFeatures.fsi index 931629eebcd..2bca1860a7c 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fsi +++ b/src/Compiler/Facilities/LanguageFeatures.fsi @@ -37,7 +37,6 @@ type LanguageFeature = | ArithmeticInLiterals | ErrorReportingOnStaticClasses | WarningWhenCopyAndUpdateRecordChangesAllFields - | StaticMembersInInterfaces | NonInlineLiteralsAsPrintfFormat | ExtendedStringInterpolation | WarningWhenMultipleRecdTypeChoice diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf index 7758bfff93f..df2276e635a 100644 --- a/src/Compiler/xlf/FSComp.txt.cs.xlf +++ b/src/Compiler/xlf/FSComp.txt.cs.xlf @@ -642,11 +642,6 @@ Povolit vazby statického let v typech union, record, struct a non-incremental-class - - Static members in interfaces - Statické členy v rozhraních - - string interpolation interpolace řetězce diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf index 08ca8cb9ebd..4ae61dbfcef 100644 --- a/src/Compiler/xlf/FSComp.txt.de.xlf +++ b/src/Compiler/xlf/FSComp.txt.de.xlf @@ -642,11 +642,6 @@ Statische let-Bindungen in den Typen "union", "record", "struct" und "non-incremental-class" zulassen - - Static members in interfaces - Statische Member in Schnittstellen - - string interpolation Zeichenfolgeninterpolation diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf index 71a3e2db55c..a633926dd72 100644 --- a/src/Compiler/xlf/FSComp.txt.es.xlf +++ b/src/Compiler/xlf/FSComp.txt.es.xlf @@ -642,11 +642,6 @@ Permitir enlaces let estáticos en tipos de clase de unión, registro, estructura y no incremental - - Static members in interfaces - Miembros estáticos en interfaces - - string interpolation interpolación de cadena diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf index d88803dec60..be75ce00209 100644 --- a/src/Compiler/xlf/FSComp.txt.fr.xlf +++ b/src/Compiler/xlf/FSComp.txt.fr.xlf @@ -642,11 +642,6 @@ Autoriser les liaisons let statiques dans les types union, record, struct et classes non incrémentielles - - Static members in interfaces - Membres statiques dans les interfaces - - string interpolation interpolation de chaîne diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf index 6e206a88f36..4b6e718d296 100644 --- a/src/Compiler/xlf/FSComp.txt.it.xlf +++ b/src/Compiler/xlf/FSComp.txt.it.xlf @@ -642,11 +642,6 @@ Consenti binding statici let in tipi di classe non incrementali, union, record, struct - - Static members in interfaces - Membri statici nelle interfacce - - string interpolation interpolazione di stringhe diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf index 3baa0fd6e17..0e54910bf1d 100644 --- a/src/Compiler/xlf/FSComp.txt.ja.xlf +++ b/src/Compiler/xlf/FSComp.txt.ja.xlf @@ -642,11 +642,6 @@ 共用体型、レコード型、構造体型、非増分クラス型の静的 let バインドを許可する - - Static members in interfaces - インターフェイス内の静的メンバー - - string interpolation 文字列の補間 diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf index bf2b4a248e7..ee75eb1a4d3 100644 --- a/src/Compiler/xlf/FSComp.txt.ko.xlf +++ b/src/Compiler/xlf/FSComp.txt.ko.xlf @@ -642,11 +642,6 @@ union, record, struct, non-incremental 클래스 형식에서 정적 let 바인딩 허용 - - Static members in interfaces - 인터페이스의 정적 멤버 - - string interpolation 문자열 보간 diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf index 76542364493..201032bde01 100644 --- a/src/Compiler/xlf/FSComp.txt.pl.xlf +++ b/src/Compiler/xlf/FSComp.txt.pl.xlf @@ -642,11 +642,6 @@ Zezwalaj na statyczne powiązania let w typach związku, rekordu, struktur, nieprzyrostowych klas - - Static members in interfaces - Statyczne składowe w interfejsach - - string interpolation interpolacja ciągu diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf index 1f1f5391694..5988bb1a051 100644 --- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf +++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf @@ -642,11 +642,6 @@ Permitir associações let estáticas em tipos de união, registro, struct e não incremental - - Static members in interfaces - Membros estáticos em interfaces - - string interpolation interpolação da cadeia de caracteres diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf index 43fdc52908d..3ce18d83484 100644 --- a/src/Compiler/xlf/FSComp.txt.ru.xlf +++ b/src/Compiler/xlf/FSComp.txt.ru.xlf @@ -642,11 +642,6 @@ Разрешить статические привязки "let" в типах union, record, struct, non-incremental-class - - Static members in interfaces - Статические элементы в интерфейсах - - string interpolation интерполяция строк diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf index 969330f4833..7903af321cf 100644 --- a/src/Compiler/xlf/FSComp.txt.tr.xlf +++ b/src/Compiler/xlf/FSComp.txt.tr.xlf @@ -642,11 +642,6 @@ Birleşim, kayıt, yapı ve artımlı olmayan sınıf türlerinde statik let bağlamalarına izin ver - - Static members in interfaces - Arabirimlerdeki statik üyeler - - string interpolation dizede düz metin arasına kod ekleme diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf index d846fb3af03..cd30ffcfe3d 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf @@ -642,11 +642,6 @@ 允许在联合、记录、结构、非增量类类型中使用静态 let 绑定 - - Static members in interfaces - 接口中的静态成员 - - string interpolation 字符串内插 diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf index 273d94dcc27..3eaf44de7f1 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf @@ -642,11 +642,6 @@ 允許在等位、記錄、結構、非累加類別類型中使用靜態 let 繫結 - - Static members in interfaces - 介面中的靜態成員 - - string interpolation 字串內插補點