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
4 changes: 2 additions & 2 deletions src/Compiler/Checking/CheckIncrementalClasses.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
15 changes: 6 additions & 9 deletions src/Compiler/Checking/Expressions/CheckExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12556,19 +12556,16 @@ 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))
elif memberFlags.MemberKind = SynMemberKind.Constructor then
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
Expand Down Expand Up @@ -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
Expand All @@ -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))
Expand Down Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions src/Compiler/Checking/Expressions/CheckExpressions.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion src/Compiler/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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."
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 @@ -47,7 +47,6 @@ type LanguageFeature =
| ArithmeticInLiterals
| ErrorReportingOnStaticClasses
| WarningWhenCopyAndUpdateRecordChangesAllFields
| StaticMembersInInterfaces
| NonInlineLiteralsAsPrintfFormat
| ExtendedStringInterpolation
| WarningWhenMultipleRecdTypeChoice
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 ()
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 @@ -37,7 +37,6 @@ type LanguageFeature =
| ArithmeticInLiterals
| ErrorReportingOnStaticClasses
| WarningWhenCopyAndUpdateRecordChangesAllFields
| StaticMembersInInterfaces
| NonInlineLiteralsAsPrintfFormat
| ExtendedStringInterpolation
| WarningWhenMultipleRecdTypeChoice
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