diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md index e2562e5a4c0..0d56900dff3 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md @@ -15,6 +15,7 @@ * Parser: recover on missing union case fields (PR [#17452](https://github.com/dotnet/fsharp/pull/17452)) * Parser: recover on missing union case field types (PR [#17455](https://github.com/dotnet/fsharp/pull/17455)) * Sink: report function domain type ([PR #17470](https://github.com/dotnet/fsharp/pull/17470)) +* Allow access modifies to auto properties getters and setters ([PR 16687](https://github.com/dotnet/fsharp/pull/16687), [PR 16861](https://github.com/dotnet/fsharp/pull/16861), [Language suggestion #430](https://github.com/fsharp/fslang-suggestions/issues/430)) * Render C# nullable-analysis attributes in tooltips ([PR #17485](https://github.com/dotnet/fsharp/pull/17485)) ### Changed diff --git a/docs/release-notes/.Language/preview.md b/docs/release-notes/.Language/preview.md index 6c2d5f0597b..28e820d4ae8 100644 --- a/docs/release-notes/.Language/preview.md +++ b/docs/release-notes/.Language/preview.md @@ -7,6 +7,7 @@ * Bidirectional F#/C# interop for 'unmanaged' constraint. ([PR #12154](https://github.com/dotnet/fsharp/pull/12154)) * Make `.Is*` discriminated union properties visible. ([Language suggestion #222](https://github.com/fsharp/fslang-suggestions/issues/222), [PR #16341](https://github.com/dotnet/fsharp/pull/16341)) * Allow returning bool instead of unit option for partial active patterns. ([Language suggestion #1041](https://github.com/fsharp/fslang-suggestions/issues/1041), [PR #16473](https://github.com/dotnet/fsharp/pull/16473)) +* Allow access modifies to auto properties getters and setters ([PR 16687](https://github.com/dotnet/fsharp/pull/16687), [PR 16861](https://github.com/dotnet/fsharp/pull/16861), [Language suggestion #430](https://github.com/fsharp/fslang-suggestions/issues/430)) * Allow #nowarn to support the FS prefix on error codes to disable warnings ([Issue #17206](https://github.com/dotnet/fsharp/issues/16447), [PR #17209](https://github.com/dotnet/fsharp/pull/17209)) * Allow ParsedHashDirectives to have argument types other than strings ([Issue #17240](https://github.com/dotnet/fsharp/issues/16447), [PR #17209](https://github.com/dotnet/fsharp/pull/17209)) * Support empty-bodied computation expressions. ([Language suggestion #1232](https://github.com/fsharp/fslang-suggestions/issues/1232), [PR #17352](https://github.com/dotnet/fsharp/pull/17352)) diff --git a/src/Compiler/Checking/CheckDeclarations.fs b/src/Compiler/Checking/CheckDeclarations.fs index 9ddff1e7585..b1fdc7f3bfe 100644 --- a/src/Compiler/Checking/CheckDeclarations.fs +++ b/src/Compiler/Checking/CheckDeclarations.fs @@ -4325,7 +4325,7 @@ module TcDeclarations = | _ -> () /// Split auto-properties into 'let' and 'member' bindings - let private SplitAutoProps members = + let private SplitAutoProps (g: TcGlobals) members = let membersIncludingAutoProps, vals_Inherits_Abstractslots = members |> List.partition (fun memb -> match memb with @@ -4375,7 +4375,7 @@ module TcDeclarations = let rec postAutoProps memb = match memb with | SynMemberDefn.AutoProperty(ident = id) when String.IsNullOrEmpty(id.idText) -> [] - | SynMemberDefn.AutoProperty(attributes=Attributes attribs; isStatic=isStatic; ident=id; typeOpt=tyOpt; propKind=propKind; memberFlags=memberFlags; memberFlagsForSet=memberFlagsForSet; xmlDoc=xmlDoc; accessibility=access; trivia = { GetSetKeywords = mGetSetOpt }) -> + | SynMemberDefn.AutoProperty(attributes=Attributes attribs; isStatic=isStatic; ident=id; typeOpt=tyOpt; propKind=propKind; memberFlags=memberFlags; memberFlagsForSet=memberFlagsForSet; xmlDoc=xmlDoc; trivia = { GetSetKeywords = mGetSetOpt }; accessibility = access) -> let mMemberPortion = id.idRange // Only the keep the non-field-targeted attributes let attribs = attribs |> List.filter (fun a -> match a.Target with Some t when t.idText = "field" -> false | _ -> true) @@ -4388,7 +4388,8 @@ module TcDeclarations = match propKind, mGetSetOpt with | SynMemberKind.PropertySet, Some getSetKeywords -> errorR(Error(FSComp.SR.parsMutableOnAutoPropertyShouldBeGetSetNotJustSet(), getSetKeywords.Range)) | _ -> () - + + let getterAccess, setterAccess = getGetterSetterAccess access propKind g.langVersion [ match propKind with | SynMemberKind.Member @@ -4398,7 +4399,7 @@ module TcDeclarations = let rhsExpr = SynExpr.Ident fldId let retInfo = match tyOpt with None -> None | Some ty -> Some (None, SynReturnInfo((ty, SynInfo.unnamedRetVal), ty.Range)) let attribs = mkAttributeList attribs mMemberPortion - let binding = mkSynBinding (xmlDoc, headPat) (access, false, false, mMemberPortion, DebugPointAtBinding.NoneAtInvisible, retInfo, rhsExpr, rhsExpr.Range, [], attribs, Some memberFlags, SynBindingTrivia.Zero) + let binding = mkSynBinding (xmlDoc, headPat) (getterAccess, false, false, mMemberPortion, DebugPointAtBinding.NoneAtInvisible, retInfo, rhsExpr, rhsExpr.Range, [], attribs, Some memberFlags, SynBindingTrivia.Zero) SynMemberDefn.Member (binding, mMemberPortion) yield getter | _ -> () @@ -4410,7 +4411,7 @@ module TcDeclarations = let vId = ident("v", mMemberPortion) let headPat = SynPat.LongIdent (SynLongIdent(headPatIds, [], List.replicate headPatIds.Length None), None, Some noInferredTypars, SynArgPats.Pats [mkSynPatVar None vId], None, mMemberPortion) let rhsExpr = mkSynAssign (SynExpr.Ident fldId) (SynExpr.Ident vId) - let binding = mkSynBinding (xmlDoc, headPat) (access, false, false, mMemberPortion, DebugPointAtBinding.NoneAtInvisible, None, rhsExpr, rhsExpr.Range, [], [], Some memberFlagsForSet, SynBindingTrivia.Zero) + let binding = mkSynBinding (xmlDoc, headPat) (setterAccess, false, false, mMemberPortion, DebugPointAtBinding.NoneAtInvisible, None, rhsExpr, rhsExpr.Range, [], [], Some memberFlagsForSet, SynBindingTrivia.Zero) SynMemberDefn.Member (binding, mMemberPortion) yield setter | _ -> ()] @@ -4434,9 +4435,9 @@ module TcDeclarations = /// where simpleRepr can contain inherit type, declared fields and virtual slots. /// body = members /// where members contain methods/overrides, also implicit ctor, inheritCall and local definitions. - let rec private SplitTyconDefn (SynTypeDefn(typeInfo=synTyconInfo;typeRepr=trepr; members=extraMembers)) = + let rec private SplitTyconDefn g (SynTypeDefn(typeInfo=synTyconInfo;typeRepr=trepr; members=extraMembers)) = let extraMembers = desugarGetSetMembers extraMembers - let extraMembers, extra_vals_Inherits_Abstractslots = SplitAutoProps extraMembers + let extraMembers, extra_vals_Inherits_Abstractslots = SplitAutoProps g extraMembers let implements1 = extraMembers |> List.choose (function SynMemberDefn.Interface (interfaceType=ty) -> Some(ty, ty.Range) | _ -> None) match trepr with @@ -4457,7 +4458,7 @@ module TcDeclarations = let slotsigs = members |> List.choose (function SynMemberDefn.AbstractSlot (slotSig = x; flags = y) -> Some(x, y) | _ -> None) - let members, _vals_Inherits_Abstractslots = SplitAutoProps members + let members, _vals_Inherits_Abstractslots = SplitAutoProps g members let isConcrete = members |> List.exists (function @@ -4519,7 +4520,7 @@ module TcDeclarations = // Split the definitions into "core representations" and "members". The code to process core representations // is shared between processing of signature files and implementation files. - let mutRecDefnsAfterSplit = mutRecDefns |> MutRecShapes.mapTycons SplitTyconDefn + let mutRecDefnsAfterSplit = mutRecDefns |> MutRecShapes.mapTycons (fun i -> SplitTyconDefn g i) // Create the entities for each module and type definition, and process the core representation of each type definition. let tycons, envMutRecPrelim, mutRecDefnsAfterCore = diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 4f8ef2b7a61..132f8b01df4 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -4132,6 +4132,20 @@ and TcPseudoMemberSpec cenv newOk env synTypes tpenv synMemberSig m = let members, tpenv = TcValSpec cenv env ModuleOrMemberBinding newOk ExprContainerInfo (Some memberFlags) (Some (List.head tys)) tpenv synValSig [] match members with | [ValSpecResult(_, _, id, _, _, memberConstraintTy, prelimValReprInfo, _)] -> + + match synValSig with + | SynValSig(accessibility = access) -> + match access with + | SynValSigAccess.Single(Some access) + | SynValSigAccess.GetSet(Some access, _, _) + | SynValSigAccess.GetSet(_, Some access, _) + | SynValSigAccess.GetSet(_, _, Some access) -> + if g.langVersion.SupportsFeature(LanguageFeature.AllowAccessModifiersToAutoPropertiesGettersAndSetters) then + errorR(Error(FSComp.SR.tcAccessModifiersNotAllowedInSRTPConstraint(), access.Range)) + else + warning(Error(FSComp.SR.tcAccessModifiersNotAllowedInSRTPConstraint(), access.Range)) + | _ -> () + let memberConstraintTypars, _ = tryDestForallTy g memberConstraintTy let valReprInfo = TranslatePartialValReprInfo memberConstraintTypars prelimValReprInfo let _, _, curriedArgInfos, returnTy, _ = GetValReprTypeInCompiledForm g valReprInfo 0 memberConstraintTy m @@ -12702,8 +12716,22 @@ let TcAndPublishValSpec (cenv: cenv, env, containerInfo: ContainerInfo, declKind let valinfos, tpenv = TcValSpec cenv env declKind newOk containerInfo memFlagsOpt None tpenv synValSig attrs let denv = env.DisplayEnv + let viss = + match memFlagsOpt with + | Some ({MemberKind = SynMemberKind.PropertyGetSet as propKind}) -> + let getterAccess, setterAccess = getGetterSetterAccess vis propKind g.langVersion + List.init valinfos.Length (fun i -> if i = 0 then getterAccess else setterAccess) + | Some ({MemberKind = SynMemberKind.PropertyGet as propKind}) -> + let getterAccess, _ = getGetterSetterAccess vis propKind g.langVersion + List.init valinfos.Length (fun _ -> getterAccess) + | Some ({MemberKind = SynMemberKind.PropertySet as propKind}) -> + let _, setterAccess = getGetterSetterAccess vis propKind g.langVersion + List.init valinfos.Length (fun _ -> setterAccess) + | _ -> + List.init valinfos.Length (fun _ -> vis.SingleAccess()) + let valinfos = List.zip valinfos viss - (tpenv, valinfos) ||> List.mapFold (fun tpenv valSpecResult -> + (tpenv, valinfos) ||> List.mapFold (fun tpenv (valSpecResult, vis) -> let (ValSpecResult (altActualParent, memberInfoOpt, id, enclosingDeclaredTypars, declaredTypars, ty, prelimValReprInfo, declKind)) = valSpecResult diff --git a/src/Compiler/Checking/NicePrint.fs b/src/Compiler/Checking/NicePrint.fs index 046f119ad08..0d0d8695227 100644 --- a/src/Compiler/Checking/NicePrint.fs +++ b/src/Compiler/Checking/NicePrint.fs @@ -501,7 +501,7 @@ module PrintTypes = | Const.Zero -> tagKeyword(if isRefTy g ty then "null" else "default") wordL str - let layoutAccessibilityCore (denv: DisplayEnv) accessibility = + let layoutAccessibilityCoreWithProtected (denv: DisplayEnv) isProtected accessibility = let isInternalCompPath x = match x with | CompPath(ILScopeRef.Local, _, []) -> true @@ -512,11 +512,15 @@ module PrintTypes = | _ when List.forall isInternalCompPath p -> Internal | _ -> Private match denv.contextAccessibility, accessibility with + | _ when isProtected -> wordL (tagKeyword "protected") | Public, Internal -> WordL.keywordInternal | Public, Private -> WordL.keywordPrivate | Internal, Private -> WordL.keywordPrivate | _ -> emptyL - + + let layoutAccessibilityCore (denv: DisplayEnv) accessibility = + layoutAccessibilityCoreWithProtected denv false accessibility + let layoutAccessibility (denv: DisplayEnv) accessibility itemL = layoutAccessibilityCore denv accessibility ++ itemL @@ -1308,7 +1312,7 @@ module PrintTastMemberOrVals = else nameL - let layoutMemberName (denv: DisplayEnv) (vref: ValRef) niceMethodTypars argInfos tagFunction name = + let layoutMemberName (denv: DisplayEnv) (vref: ValRef) niceMethodTypars argInfos tagFunction name withAccessibility = let nameL = ConvertValLogicalNameToDisplayLayout vref.IsBaseVal (tagFunction >> mkNav vref.DefinitionRange >> wordL) name let nameL = if denv.showMemberContainers then @@ -1330,8 +1334,8 @@ module PrintTastMemberOrVals = layoutTyparDecls denv nameL true niceMethodTypars else nameL - let nameL = layoutAccessibility denv vref.Accessibility nameL - nameL + if withAccessibility then layoutAccessibility denv vref.Accessibility nameL + else nameL let prettyLayoutOfMemberShortOption denv typarInst (v: Val) short = let denv = suppressNullnessAnnotations denv @@ -1345,6 +1349,8 @@ module PrintTastMemberOrVals = for _,info in argInfo do info.Attribs <- [] info.Name <- None + let supportAccessModifiersBeforeGetSet = + denv.g.langVersion.SupportsFeature Features.LanguageFeature.AllowAccessModifiersToAutoPropertiesGettersAndSetters let prettyTyparInst, memberL = match membInfo.MemberFlags.MemberKind with @@ -1353,7 +1359,7 @@ module PrintTastMemberOrVals = let resL = if short then tauL else - let nameL = layoutMemberName denv vref niceMethodTypars argInfos tagMember vref.DisplayNameCoreMangled + let nameL = layoutMemberName denv vref niceMethodTypars argInfos tagMember vref.DisplayNameCoreMangled true let nameL = if short then nameL else mkInlineL denv vref.Deref nameL stat --- ((nameL |> addColonL) ^^ tauL) prettyTyparInst, resL @@ -1372,14 +1378,19 @@ module PrintTastMemberOrVals = emptyTyparInst, stat | SynMemberKind.PropertyGet -> + let prefixAccessModifier, withGet = + if supportAccessModifiersBeforeGetSet then + false, WordL.keywordWith ^^ layoutAccessibilityCore denv vref.Accessibility ^^ wordL (tagText "get") + else + true, WordL.keywordWith ^^ wordL (tagText "get") if isNil argInfos then // use error recovery because intellisense on an incomplete file will show this errorR(Error(FSComp.SR.tastInvalidFormForPropertyGetter(), vref.Id.idRange)) - let nameL = layoutMemberName denv vref [] argInfos tagProperty vref.DisplayNameCoreMangled + let nameL = layoutMemberName denv vref [] argInfos tagProperty vref.DisplayNameCoreMangled prefixAccessModifier let nameL = if short then nameL else mkInlineL denv vref.Deref nameL let resL = - if short then nameL --- (WordL.keywordWith ^^ WordL.keywordGet) - else stat --- nameL --- (WordL.keywordWith ^^ WordL.keywordGet) + if short then nameL --- withGet + else stat --- nameL --- withGet emptyTyparInst, resL else let argInfos = @@ -1389,21 +1400,25 @@ module PrintTastMemberOrVals = let prettyTyparInst, niceMethodTypars,tauL = prettyLayoutOfMemberType denv vref typarInst argInfos retTy let resL = if short then - if isNil argInfos then tauL - else tauL --- (WordL.keywordWith ^^ WordL.keywordGet) + tauL --- withGet else - let nameL = layoutMemberName denv vref niceMethodTypars argInfos tagProperty vref.DisplayNameCoreMangled + let nameL = layoutMemberName denv vref niceMethodTypars argInfos tagProperty vref.DisplayNameCoreMangled prefixAccessModifier let nameL = if short then nameL else mkInlineL denv vref.Deref nameL - stat --- ((nameL |> addColonL) ^^ (if isNil argInfos then tauL else tauL --- (WordL.keywordWith ^^ WordL.keywordGet))) + stat --- ((nameL |> addColonL) ^^ (if isNil argInfos && not supportAccessModifiersBeforeGetSet then tauL else tauL --- withGet)) prettyTyparInst, resL | SynMemberKind.PropertySet -> + let prefixAccessModifier, withSet = + if supportAccessModifiersBeforeGetSet then + false, WordL.keywordWith ^^ layoutAccessibilityCore denv vref.Accessibility ^^ wordL (tagText "set") + else + true, WordL.keywordWith ^^ wordL (tagText "set") if argInfos.Length <> 1 || isNil argInfos.Head then // use error recovery because intellisense on an incomplete file will show this errorR(Error(FSComp.SR.tastInvalidFormForPropertySetter(), vref.Id.idRange)) - let nameL = layoutMemberName denv vref [] argInfos tagProperty vref.DisplayNameCoreMangled + let nameL = layoutMemberName denv vref [] argInfos tagProperty vref.DisplayNameCoreMangled prefixAccessModifier let nameL = if short then nameL else mkInlineL denv vref.Deref nameL - let resL = stat --- nameL --- (WordL.keywordWith ^^ WordL.keywordSet) + let resL = stat --- nameL --- withSet emptyTyparInst, resL else let curriedArgInfos = argInfos @@ -1411,11 +1426,11 @@ module PrintTastMemberOrVals = let prettyTyparInst, niceMethodTypars, tauL = prettyLayoutOfMemberType denv vref typarInst (if isNil argInfos then [] else [argInfos]) (fst valueInfo) let resL = if short then - (tauL --- (WordL.keywordWith ^^ WordL.keywordSet)) + (tauL --- withSet) else - let nameL = layoutMemberName denv vref niceMethodTypars curriedArgInfos tagProperty vref.DisplayNameCoreMangled + let nameL = layoutMemberName denv vref niceMethodTypars curriedArgInfos tagProperty vref.DisplayNameCoreMangled prefixAccessModifier let nameL = if short then nameL else mkInlineL denv vref.Deref nameL - stat --- ((nameL |> addColonL) ^^ (tauL --- (WordL.keywordWith ^^ WordL.keywordSet))) + stat --- ((nameL |> addColonL) ^^ (tauL --- withSet)) prettyTyparInst, resL prettyTyparInst, memberL @@ -1745,14 +1760,20 @@ module InfoMemberPrinting = let retTy = if pinfo.IsIndexer then mkFunTy g (mkRefTupledTy g (pinfo.GetParamTypes(amap, m))) retTy else retTy let retTy, _ = PrettyTypes.PrettifyType g retTy let nameL = ConvertValLogicalNameToDisplayLayout false (tagProperty >> tagNavArbValRef pinfo.ArbitraryValRef >> wordL) pinfo.PropertyName + let struct(isGetterProtect, isSetterProtect) = pinfo.IsProtectedAccessibility + let getterAccess, setterAccess = + if denv.g.langVersion.SupportsFeature Features.LanguageFeature.AllowAccessModifiersToAutoPropertiesGettersAndSetters then + PrintTypes.layoutAccessibilityCoreWithProtected denv isGetterProtect (Option.defaultValue taccessPublic pinfo.GetterAccessibility), + PrintTypes.layoutAccessibilityCoreWithProtected denv isSetterProtect (Option.defaultValue taccessPublic pinfo.SetterAccessibility) + else emptyL, emptyL let getterSetter = match pinfo.HasGetter, pinfo.HasSetter with | true, false -> - WordL.keywordWith ^^ WordL.keywordGet + WordL.keywordWith ^^ getterAccess ^^ wordL (tagText "get") | false, true -> - WordL.keywordWith ^^ WordL.keywordSet + WordL.keywordWith ^^ setterAccess ^^ wordL (tagText "set") | true, true -> - WordL.keywordWith ^^ wordL (tagText "get, set") + WordL.keywordWith ^^ getterAccess ^^ wordL (tagText "get") ^^ RightL.comma ++ setterAccess ^^ wordL (tagText "set") | false, false -> emptyL @@ -1889,14 +1910,11 @@ module TastDefinitionPrinting = let layoutPropInfo denv (infoReader: InfoReader) m (pinfo: PropInfo) : Layout list = let amap = infoReader.amap - let isPublicGetterSetter (getter: MethInfo) (setter: MethInfo) = - let isPublicAccess access = access = TAccess [] - match getter.ArbitraryValRef, setter.ArbitraryValRef with - | Some gRef, Some sRef -> isPublicAccess gRef.Accessibility && isPublicAccess sRef.Accessibility - | _ -> false - + let supportAccessModifiersBeforeGetSet = + denv.g.langVersion.SupportsFeature Features.LanguageFeature.AllowAccessModifiersToAutoPropertiesGettersAndSetters + match pinfo.ArbitraryValRef with - | Some vref -> + | Some vref when not supportAccessModifiersBeforeGetSet -> match pinfo with | DifferentGetterAndSetter(getValRef, setValRef) -> let getSuffix = if pinfo.IsIndexer then emptyL else WordL.keywordWith ^^ WordL.keywordGet @@ -1905,11 +1923,37 @@ module TastDefinitionPrinting = PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv infoReader setValRef ] | _ -> + let isPublicGetterSetter (getter: MethInfo) (setter: MethInfo) = + let isPublicAccess access = access = TAccess [] + match getter.ArbitraryValRef, setter.ArbitraryValRef with + | Some gRef, Some sRef -> isPublicAccess gRef.Accessibility && isPublicAccess sRef.Accessibility + | _ -> false + let propL = PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv infoReader vref - if pinfo.HasGetter && pinfo.HasSetter && not pinfo.IsIndexer && isPublicGetterSetter pinfo.GetterMethod pinfo.SetterMethod then + if pinfo.HasGetter && pinfo.HasSetter && not pinfo.IsIndexer && isPublicGetterSetter pinfo.GetterMethod pinfo.SetterMethod then [ propL ^^ WordL.keywordWith ^^ wordL (tagText "get, set") ] else [ propL ] + + | Some vref -> + let propL = PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv infoReader vref + if pinfo.HasGetter && pinfo.HasSetter then + let rec ``replace 'with'`` layout newLayout = + match layout with + | Node(Leaf (text = text), _, _) when text.Text = "with" -> newLayout + | Node(l, r, i) -> Node(l, ``replace 'with'`` r newLayout , i) + | Attr(text, attr, l) -> Attr(text, attr, ``replace 'with'`` l newLayout ) + | Leaf _ + | ObjLeaf _ -> layout + + let getterAccess, setterAccess = + pinfo.GetterMethod.ArbitraryValRef |> Option.map _.Accessibility |> Option.defaultValue taccessPublic, + pinfo.SetterMethod.ArbitraryValRef |> Option.map _.Accessibility |> Option.defaultValue taccessPublic + let getSet = + WordL.keywordWith ^^ layoutAccessibilityCore denv getterAccess ^^ wordL (tagText "get") ^^ RightL.comma --- layoutAccessibilityCore denv setterAccess ^^ wordL (tagText "set") + [ ``replace 'with'`` propL getSet ] + else + [ propL ] | None -> let modifierAndMember = diff --git a/src/Compiler/Checking/infos.fs b/src/Compiler/Checking/infos.fs index 6ab2bed3931..55c737c6917 100644 --- a/src/Compiler/Checking/infos.fs +++ b/src/Compiler/Checking/infos.fs @@ -1832,6 +1832,38 @@ type PropInfo = | ProvidedProp(_, pi, m) -> pi.PUntaint((fun pi -> pi.CanWrite), m) #endif + member x.GetterAccessibility = + match x with + | ILProp ilpinfo when ilpinfo.HasGetter -> Some taccessPublic + | ILProp _ -> None + + | FSProp(_, _, Some getter, _) -> Some getter.Accessibility + | FSProp _ -> None + +#if !NO_TYPEPROVIDERS + | ProvidedProp(_, pi, m) -> pi.PUntaint((fun pi -> if pi.CanWrite then Some taccessPublic else None), m) +#endif + + member x.SetterAccessibility = + match x with + | ILProp ilpinfo when ilpinfo.HasSetter -> Some taccessPublic + | ILProp _ -> None + + | FSProp(_, _, _, Some setter) -> Some setter.Accessibility + | FSProp _ -> None + +#if !NO_TYPEPROVIDERS + | ProvidedProp(_, pi, m) -> pi.PUntaint((fun pi -> if pi.CanWrite then Some taccessPublic else None), m) +#endif + + member x.IsProtectedAccessibility = + match x with + | ILProp ilpinfo when ilpinfo.HasGetter && ilpinfo.HasSetter -> + struct(ilpinfo.GetterMethod.IsProtectedAccessibility, ilpinfo.SetterMethod.IsProtectedAccessibility) + | ILProp ilpinfo when ilpinfo.HasGetter -> struct(ilpinfo.GetterMethod.IsProtectedAccessibility, false) + | ILProp ilpinfo when ilpinfo.HasSetter -> struct(false, ilpinfo.SetterMethod.IsProtectedAccessibility) + | _ -> struct(false, false) + member x.IsSetterInitOnly = match x with | ILProp ilpinfo -> ilpinfo.IsSetterInitOnly diff --git a/src/Compiler/Checking/infos.fsi b/src/Compiler/Checking/infos.fsi index 406919bfa37..05e017ff144 100644 --- a/src/Compiler/Checking/infos.fsi +++ b/src/Compiler/Checking/infos.fsi @@ -822,6 +822,12 @@ type PropInfo = /// Indicates if this property has an associated setter method. member HasSetter: bool + member GetterAccessibility: Accessibility option + + member SetterAccessibility: Accessibility option + + member IsProtectedAccessibility: struct (bool * bool) + /// Indidcates whether IL property has an init-only setter (i.e. has the `System.Runtime.CompilerServices.IsExternalInit` modifer) member IsSetterInitOnly: bool diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt index 62412a7698a..293317c9c13 100644 --- a/src/Compiler/FSComp.txt +++ b/src/Compiler/FSComp.txt @@ -1771,8 +1771,10 @@ featureReuseSameFieldsInStructUnions,"Share underlying fields in a [] di 3868,tcActivePatternArgsCountNotMatchOnlyPat,"This active pattern expects exactly one pattern argument, e.g., '%s pat'." 3868,tcActivePatternArgsCountNotMatchArgs,"This active pattern expects %d expression argument(s), e.g., '%s%s'." 3868,tcActivePatternArgsCountNotMatchArgsAndPat,"This active pattern expects %d expression argument(s) and a pattern argument, e.g., '%s%s pat'." +featureAllowAccessModifiersToAutoPropertiesGettersAndSetters,"Allow access modifiers to auto properties getters and setters" +3869,tcAccessModifiersNotAllowedInSRTPConstraint,"Access modifiers cannot be applied to an SRTP constraint." featureParsedHashDirectiveArgumentNonString,"# directives with non-quoted string arguments" -3869,featureParsedHashDirectiveUnexpectedInteger,"Unexpected integer literal '%d'." -3869,featureParsedHashDirectiveUnexpectedIdentifier,"Unexpected identifier '%s'." +3870,featureParsedHashDirectiveUnexpectedInteger,"Unexpected integer literal '%d'." +3870,featureParsedHashDirectiveUnexpectedIdentifier,"Unexpected identifier '%s'." featureEmptyBodiedComputationExpressions,"Support for computation expressions with empty bodies: builder {{ }}" 3870,parsExpectingUnionCaseField,"Expecting union case field" diff --git a/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs index 2fd2e150bcc..6067cbe597a 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fs +++ b/src/Compiler/Facilities/LanguageFeatures.fs @@ -89,6 +89,7 @@ type LanguageFeature = | EnforceAttributeTargets | LowerInterpolatedStringToConcat | LowerIntegralRangesToFastLoops + | AllowAccessModifiersToAutoPropertiesGettersAndSetters | LowerSimpleMappingsInComprehensionsToFastLoops | ParsedHashDirectiveArgumentNonQuotes | EmptyBodiedComputationExpressions @@ -215,6 +216,7 @@ type LanguageVersion(versionText) = LanguageFeature.UnmanagedConstraintCsharpInterop, previewVersion // not enabled because: https://github.com/dotnet/fsharp/issues/17509 LanguageFeature.EnforceAttributeTargets, previewVersion // not enabled because: https://github.com/dotnet/fsharp/issues/17514 LanguageFeature.FromEndSlicing, previewVersion // Unfinished features --- needs work + LanguageFeature.AllowAccessModifiersToAutoPropertiesGettersAndSetters, previewVersion ] static let defaultLanguageVersion = LanguageVersion("default") @@ -364,6 +366,8 @@ type LanguageVersion(versionText) = | LanguageFeature.EnforceAttributeTargets -> FSComp.SR.featureEnforceAttributeTargets () | LanguageFeature.LowerInterpolatedStringToConcat -> FSComp.SR.featureLowerInterpolatedStringToConcat () | LanguageFeature.LowerIntegralRangesToFastLoops -> FSComp.SR.featureLowerIntegralRangesToFastLoops () + | LanguageFeature.AllowAccessModifiersToAutoPropertiesGettersAndSetters -> + FSComp.SR.featureAllowAccessModifiersToAutoPropertiesGettersAndSetters () | LanguageFeature.LowerSimpleMappingsInComprehensionsToFastLoops -> FSComp.SR.featureLowerSimpleMappingsInComprehensionsToFastLoops () | LanguageFeature.ParsedHashDirectiveArgumentNonQuotes -> FSComp.SR.featureParsedHashDirectiveArgumentNonString () diff --git a/src/Compiler/Facilities/LanguageFeatures.fsi b/src/Compiler/Facilities/LanguageFeatures.fsi index 64f20d3f55a..470157474b0 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fsi +++ b/src/Compiler/Facilities/LanguageFeatures.fsi @@ -80,6 +80,7 @@ type LanguageFeature = | EnforceAttributeTargets | LowerInterpolatedStringToConcat | LowerIntegralRangesToFastLoops + | AllowAccessModifiersToAutoPropertiesGettersAndSetters | LowerSimpleMappingsInComprehensionsToFastLoops | ParsedHashDirectiveArgumentNonQuotes | EmptyBodiedComputationExpressions diff --git a/src/Compiler/Service/ServiceNavigation.fs b/src/Compiler/Service/ServiceNavigation.fs index 03afe63b373..48f7d6dc01c 100755 --- a/src/Compiler/Service/ServiceNavigation.fs +++ b/src/Compiler/Service/ServiceNavigation.fs @@ -332,13 +332,21 @@ module NavigationImpl = [ createMember (rcid, NavigationItemKind.Field, FSharpGlyph.Field, range, enclosingEntityKind, false, access) ] - | SynMemberDefn.AutoProperty(ident = id; accessibility = access) -> + | SynMemberDefn.AutoProperty(ident = id; accessibility = access; propKind = propKind) -> + let getterAccessibility, setterAccessibility = access.GetSetAccessNoCheck() + [ - createMember (id, NavigationItemKind.Field, FSharpGlyph.Field, id.idRange, enclosingEntityKind, false, access) + match propKind with + | SynMemberKind.PropertyGetSet -> + yield createMember (id, NavigationItemKind.Field, FSharpGlyph.Field, id.idRange, enclosingEntityKind, false, getterAccessibility) + yield createMember (id, NavigationItemKind.Field, FSharpGlyph.Field, id.idRange, enclosingEntityKind, false, setterAccessibility) + | SynMemberKind.PropertySet -> + yield createMember (id, NavigationItemKind.Field, FSharpGlyph.Field, id.idRange, enclosingEntityKind, false, setterAccessibility) + | _ -> yield createMember (id, NavigationItemKind.Field, FSharpGlyph.Field, id.idRange, enclosingEntityKind, false, getterAccessibility) ] | SynMemberDefn.AbstractSlot(slotSig = SynValSig(ident = SynIdent(id, _); synType = ty; accessibility = access)) -> [ - createMember (id, NavigationItemKind.Method, FSharpGlyph.OverridenMethod, ty.Range, enclosingEntityKind, true, access) + createMember (id, NavigationItemKind.Method, FSharpGlyph.OverridenMethod, ty.Range, enclosingEntityKind, true, access.SingleAccess()) ] | SynMemberDefn.NestedType _ -> failwith "tycon as member????" //processTycon tycon | SynMemberDefn.Interface(members = Some(membs)) -> processMembers membs enclosingEntityKind |> snd @@ -564,10 +572,18 @@ module NavigationImpl = [ for memb in members do match memb with - | SynMemberSig.Member(memberSig = SynValSig.SynValSig(ident = SynIdent(id, _); accessibility = access; range = m)) -> - createMember (id, NavigationItemKind.Method, FSharpGlyph.Method, m, NavigationEntityKind.Class, false, access) + | SynMemberSig.Member(memberSig = SynValSig.SynValSig(ident = SynIdent(id, _); accessibility = access; range = m); flags = { MemberKind = propKind }) -> + let getterAccessibility, setterAccessibility = access.GetSetAccessNoCheck() + + match propKind with + | SynMemberKind.PropertyGetSet -> + yield createMember (id, NavigationItemKind.Method, FSharpGlyph.Method, m, NavigationEntityKind.Class, false, getterAccessibility) + yield createMember (id, NavigationItemKind.Method, FSharpGlyph.Method, m, NavigationEntityKind.Class, false, setterAccessibility) + | SynMemberKind.PropertySet -> + yield createMember (id, NavigationItemKind.Method, FSharpGlyph.Method, m, NavigationEntityKind.Class, false, setterAccessibility) + | _ -> yield createMember (id, NavigationItemKind.Method, FSharpGlyph.Method, m, NavigationEntityKind.Class, false, getterAccessibility) | SynMemberSig.ValField(SynField(idOpt = Some rcid; fieldType = ty; accessibility = access), _) -> - createMember (rcid, NavigationItemKind.Field, FSharpGlyph.Field, ty.Range, NavigationEntityKind.Class, false, access) + yield createMember (rcid, NavigationItemKind.Field, FSharpGlyph.Field, ty.Range, NavigationEntityKind.Class, false, access) | _ -> () ] @@ -577,7 +593,7 @@ module NavigationImpl = for decl in decls do match decl with | SynModuleSigDecl.Val(SynValSig.SynValSig(ident = SynIdent(id, _); accessibility = access; range = m), _) -> - createMember (id, NavigationItemKind.Method, FSharpGlyph.Method, m, NavigationEntityKind.Module, false, access) + createMember (id, NavigationItemKind.Method, FSharpGlyph.Method, m, NavigationEntityKind.Module, false, access.SingleAccess()) | _ -> () ] diff --git a/src/Compiler/Symbols/Symbols.fs b/src/Compiler/Symbols/Symbols.fs index 33965a93f2e..693632da9a4 100644 --- a/src/Compiler/Symbols/Symbols.fs +++ b/src/Compiler/Symbols/Symbols.fs @@ -2389,18 +2389,54 @@ type FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | _ -> NicePrint.stringOfMethInfoFSharpStyle cenv.infoReader m displayEnv methInfo let stringValOfPropInfo (p: PropInfo) = - match p with - | DifferentGetterAndSetter(getValRef, setValRef) -> - let g = NicePrint.stringValOrMember displayEnv cenv.infoReader getValRef - let s = NicePrint.stringValOrMember displayEnv cenv.infoReader setValRef - $"{g}\n{s}" - | _ -> - let t = p.GetPropertyType(cenv.amap, m ) |> NicePrint.layoutType displayEnv |> LayoutRender.showL + let supportAccessModifiersBeforeGetSet = + cenv.g.langVersion.SupportsFeature Features.LanguageFeature.AllowAccessModifiersToAutoPropertiesGettersAndSetters + if not supportAccessModifiersBeforeGetSet then + match p with + | DifferentGetterAndSetter(getValRef, setValRef) -> + let g = NicePrint.stringValOrMember displayEnv cenv.infoReader getValRef + let s = NicePrint.stringValOrMember displayEnv cenv.infoReader setValRef + $"{g}\n{s}" + | _ -> + let t = p.GetPropertyType(cenv.amap, m) |> NicePrint.layoutType displayEnv |> LayoutRender.showL + let withGetSet = + if p.HasGetter && p.HasSetter then "with get, set" + elif p.HasGetter then "with get" + elif p.HasSetter then "with set" + else "" + + $"member %s{p.DisplayName}: %s{t} %s{withGetSet}" + else + let layoutAccessibilityCore (denv: DisplayEnv) accessibility = + let isInternalCompPath x = + match x with + | CompPath(ILScopeRef.Local, _, []) -> true + | _ -> false + let (|Public|Internal|Private|) (TAccess p) = + match p with + | [] -> Public + | _ when List.forall isInternalCompPath p -> Internal + | _ -> Private + match denv.contextAccessibility, accessibility with + | Public, Internal -> "internal " + | Public, Private -> "private " + | Internal, Private -> "private " + | _ -> String.Empty + + let getterAccess, setterAccess = + layoutAccessibilityCore displayEnv (Option.defaultValue taccessPublic p.GetterAccessibility), + layoutAccessibilityCore displayEnv (Option.defaultValue taccessPublic p.SetterAccessibility) + let t = p.GetPropertyType(cenv.amap, m) |> NicePrint.layoutType displayEnv |> LayoutRender.showL let withGetSet = - if p.HasGetter && p.HasSetter then "with get, set" - elif p.HasGetter then "with get" - elif p.HasSetter then "with set" - else "" + match p.HasGetter, p.HasSetter with + | true, false -> + $"with %s{getterAccess}get" + | false, true -> + $"with %s{setterAccess}set" + | true, true -> + $"with %s{getterAccess}get, %s{setterAccess}set" + | false, false -> + String.Empty $"member %s{p.DisplayName}: %s{t} %s{withGetSet}" diff --git a/src/Compiler/SyntaxTree/ParseHelpers.fs b/src/Compiler/SyntaxTree/ParseHelpers.fs index d90e395c0c9..3f6c12dd217 100644 --- a/src/Compiler/SyntaxTree/ParseHelpers.fs +++ b/src/Compiler/SyntaxTree/ParseHelpers.fs @@ -1101,7 +1101,8 @@ let mkSynUnionCase attributes (access: SynAccess option) id kind mDecl (xmlDoc, SynUnionCase(attributes, id, kind, xmlDoc, None, mDecl, trivia) let mkAutoPropDefn mVal access ident typ mEquals (expr: SynExpr) accessors xmlDoc attribs flags rangeStart = - let mWith, (getSet, getSetOpt) = accessors + let mWith, (getSet, getSetOpt, getterAccess, setterAccess) = accessors + let access = SynValSigAccess.GetSet(access, getterAccess, setterAccess) let memberRange = match getSetOpt with diff --git a/src/Compiler/SyntaxTree/ParseHelpers.fsi b/src/Compiler/SyntaxTree/ParseHelpers.fsi index a8d61f3cb7e..52f4257d4c2 100644 --- a/src/Compiler/SyntaxTree/ParseHelpers.fsi +++ b/src/Compiler/SyntaxTree/ParseHelpers.fsi @@ -272,7 +272,7 @@ val mkAutoPropDefn: typ: SynType option -> mEquals: range option -> expr: SynExpr -> - accessors: range option * (SynMemberKind * GetSetKeywords option) -> + accessors: range option * (SynMemberKind * GetSetKeywords option * SynAccess option * SynAccess option) -> xmlDoc: PreXmlDoc -> attribs: SynAttributes -> flags: (SynMemberKind -> SynMemberFlags) * SynLeadingKeyword -> diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index 3670a299122..5a9b158875d 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -1331,6 +1331,24 @@ type SynComponentInfo = match this with | SynComponentInfo(range = m) -> m +[] +type SynValSigAccess = + | Single of accessibility: SynAccess option + | GetSet of accessibility: SynAccess option * getterAccessibility: SynAccess option * setterAccessibility: SynAccess option + + member this.SingleAccess() = + match this with + | Single(access) + | GetSet(accessibility = access) -> access + + member this.GetSetAccessNoCheck() = + match this with + | Single(access) -> access, access + | GetSet(access, getterAccess, setterAccess) -> + let getterAccess = getterAccess |> Option.orElse access + let setterAccess = setterAccess |> Option.orElse access + getterAccess, setterAccess + [] type SynValSig = | SynValSig of @@ -1342,7 +1360,7 @@ type SynValSig = isInline: bool * isMutable: bool * xmlDoc: PreXmlDoc * - accessibility: SynAccess option * + accessibility: SynValSigAccess * synExpr: SynExpr option * range: range * trivia: SynValSigTrivia @@ -1485,7 +1503,7 @@ type SynMemberDefn = memberFlags: SynMemberFlags * memberFlagsForSet: SynMemberFlags * xmlDoc: PreXmlDoc * - accessibility: SynAccess option * + accessibility: SynValSigAccess * synExpr: SynExpr * range: range * trivia: SynMemberDefnAutoPropertyTrivia diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index 5b816b38fbe..88529957c25 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -1489,6 +1489,18 @@ type SynComponentInfo = /// Gets the syntax range of this construct member Range: range +/// Represents two access +[] +type SynValSigAccess = + | Single of accessibility: SynAccess option + | GetSet of + accessibility: SynAccess option * + getterAccessibility: SynAccess option * + setterAccessibility: SynAccess option + + member SingleAccess: unit -> SynAccess option + member GetSetAccessNoCheck: unit -> SynAccess option * SynAccess option + /// Represents the syntax tree for a 'val' definition in an abstract slot or a signature file [] type SynValSig = @@ -1501,7 +1513,7 @@ type SynValSig = isInline: bool * isMutable: bool * xmlDoc: PreXmlDoc * - accessibility: SynAccess option * + accessibility: SynValSigAccess * synExpr: SynExpr option * range: range * trivia: SynValSigTrivia @@ -1667,7 +1679,7 @@ type SynMemberDefn = memberFlags: SynMemberFlags * memberFlagsForSet: SynMemberFlags * xmlDoc: PreXmlDoc * - accessibility: SynAccess option * + accessibility: SynValSigAccess * synExpr: SynExpr * range: range * trivia: SynMemberDefnAutoPropertyTrivia diff --git a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs index 06a758163ab..1463de7625e 100644 --- a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs +++ b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs @@ -1103,6 +1103,46 @@ let (|Get_OrSet_Ident|_|) (ident: Ident) = elif ident.idText.StartsWithOrdinal("set_") then ValueSome() else ValueNone +let getGetterSetterAccess synValSigAccess memberKind (langVersion: Features.LanguageVersion) = + match synValSigAccess with + | SynValSigAccess.Single(access) -> access, access + | SynValSigAccess.GetSet(access, getterAccess, setterAccess) -> + let checkAccess (access: SynAccess option) (accessBeforeGetSet: SynAccess option) = + match accessBeforeGetSet, access with + | None, _ -> access + | Some x, Some _ -> + errorR (Error(FSComp.SR.parsMultipleAccessibilitiesForGetSet (), x.Range)) + None + | Some x, None -> + checkLanguageFeatureAndRecover + langVersion + Features.LanguageFeature.AllowAccessModifiersToAutoPropertiesGettersAndSetters + x.Range + + accessBeforeGetSet + + match memberKind with + | SynMemberKind.PropertyGetSet -> + match access, (getterAccess, setterAccess) with + | _, (None, None) -> access, access + | None, (Some x, _) + | None, (_, Some x) -> + checkLanguageFeatureAndRecover + langVersion + Features.LanguageFeature.AllowAccessModifiersToAutoPropertiesGettersAndSetters + x.Range + + getterAccess, setterAccess + | _, (Some x, _) + | _, (_, Some x) -> + errorR (Error(FSComp.SR.parsMultipleAccessibilitiesForGetSet (), x.Range)) + None, None + + | SynMemberKind.PropertySet -> None, checkAccess access setterAccess + | SynMemberKind.Member + | SynMemberKind.PropertyGet + | _ -> checkAccess access getterAccess, None + let addEmptyMatchClause (mBar1: range) (mBar2: range) (clauses: SynMatchClause list) = let rec addOrPat (pat: SynPat) = match pat with diff --git a/src/Compiler/SyntaxTree/SyntaxTreeOps.fsi b/src/Compiler/SyntaxTree/SyntaxTreeOps.fsi index b86ee98cddb..568e745a167 100644 --- a/src/Compiler/SyntaxTree/SyntaxTreeOps.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTreeOps.fsi @@ -363,5 +363,8 @@ val (|TypesForTypar|): t: SynType -> SynType list [] val (|Get_OrSet_Ident|_|): Ident -> unit voption +val getGetterSetterAccess: + SynValSigAccess -> SynMemberKind -> Features.LanguageVersion -> SynAccess option * SynAccess option + /// Adds SynPat.Or pattern for unfinished empty clause above val addEmptyMatchClause: mBar1: range -> mBar2: range -> clauses: SynMatchClause list -> SynMatchClause list diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 0088142917f..1ca53a9bc9d 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -741,6 +741,7 @@ valSpfn: | opt_attributes opt_access VAL opt_attributes opt_inline opt_mutable opt_access nameop opt_explicitValTyparDecls COLON topTypeWithTypeConstraints optLiteralValueSpfn { if Option.isSome $2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(), rhs parseState 2)) let attr1, attr2, isInline, isMutable, vis2, id, doc, explicitValTyparDecls, (ty, arity), (mEquals, konst: SynExpr option) = ($1), ($4), (Option.isSome $5), (Option.isSome $6), ($7), ($8), grabXmlDoc(parseState, $1, 1), ($9), ($11), ($12) + let vis2 = SynValSigAccess.Single(vis2) if not (isNil attr2) then errorR(Deprecated(FSComp.SR.parsAttributesMustComeBeforeVal(), rhs parseState 4)) let m = rhs2 parseState 1 11 @@ -886,7 +887,9 @@ tyconSpfnRhs: { let m = lhs parseState let ty, arity = $3 let flags = AbstractMemberFlags true SynMemberKind.Member - let valSig = SynValSig([], (SynIdent(mkSynId m "Invoke", None)), inferredTyparDecls, ty, arity, false, false, PreXmlDoc.Empty, None, None, m, SynValSigTrivia.Zero) + let vis2 = SynValSigAccess.Single(None) + + let valSig = SynValSig([], (SynIdent(mkSynId m "Invoke", None)), inferredTyparDecls, ty, arity, false, false, PreXmlDoc.Empty, vis2, None, m, SynValSigTrivia.Zero) let invoke = SynMemberSig.Member(valSig, flags, m, SynMemberSigMemberTrivia.Zero) (fun leadingKeyword nameRange nameInfo mEquals augmentation -> if not (isNil augmentation) then raiseParseErrorAt m (FSComp.SR.parsAugmentationsIllegalOnDelegateType()) @@ -961,7 +964,12 @@ classMemberSpfn: | opt_attributes opt_access memberSpecFlags opt_inline opt_access nameop opt_explicitValTyparDecls COLON topTypeWithTypeConstraints classMemberSpfnGetSet optLiteralValueSpfn { if Option.isSome $2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(), rhs parseState 2)) let isInline, doc, vis2, id, explicitValTyparDecls, (ty, arity), (mEquals, optLiteralValue) = (Option.isSome $4), grabXmlDoc(parseState, $1, 1), $5, $6, $7, $9, $11 - let mWith, (getSet, getSetRangeOpt) = $10 + let mWith, (getSet, getSetRangeOpt, getterAccess, setterAccess) = $10 + let vis2 = + match getterAccess, setterAccess with + | None, None -> SynValSigAccess.Single(vis2) + | _ -> SynValSigAccess.GetSet(vis2, getterAccess, setterAccess) + let getSetAdjuster arity = match arity, getSet with SynValInfo([], _), SynMemberKind.Member -> SynMemberKind.PropertyGet | _ -> getSet let mWhole = let m = rhs parseState 3 @@ -1022,18 +1030,19 @@ classMemberSpfn: | opt_attributes opt_access NEW COLON topTypeWithTypeConstraints { let vis, doc, (ty, valSynInfo) = $2, grabXmlDoc(parseState, $1, 1), $5 + let vis2 = SynValSigAccess.Single(vis) let mNew = rhs parseState 3 let m = unionRanges (rhs parseState 1) ty.Range |> unionRangeWithXmlDoc doc let isInline = false let trivia: SynValSigTrivia = { LeadingKeyword = SynLeadingKeyword.New mNew; InlineKeyword = None; WithKeyword = None; EqualsRange = None } - let valSpfn = SynValSig ($1, (SynIdent(mkSynId (rhs parseState 3) "new", None)), noInferredTypars, ty, valSynInfo, isInline, false, doc, vis, None, m, trivia) + let valSpfn = SynValSig ($1, (SynIdent(mkSynId (rhs parseState 3) "new", None)), noInferredTypars, ty, valSynInfo, isInline, false, doc, vis2, None, m, trivia) SynMemberSig.Member(valSpfn, CtorMemberFlags, m, SynMemberSigMemberTrivia.Zero) } /* The optional "with get, set" on a member in a signature */ classMemberSpfnGetSet: | /* EMPTY */ - { None, (SynMemberKind.Member, None) } + { None, (SynMemberKind.Member, None, None, None) } | WITH classMemberSpfnGetSetElements { let mWith = rhs parseState 1 @@ -1051,39 +1060,39 @@ classMemberSpfnGetSet: /* The "get, set" on a property member in a signature */ classMemberSpfnGetSetElements: - | nameop - { (let (SynIdent(id:Ident, _)) = $1 + | opt_access nameop + { (let (SynIdent(id:Ident, _)) = $2 if id.idText = "get" then - SynMemberKind.PropertyGet, Some(GetSetKeywords.Get id.idRange) + SynMemberKind.PropertyGet, Some(GetSetKeywords.Get id.idRange), $1, None else if id.idText = "set" then - SynMemberKind.PropertySet, Some(GetSetKeywords.Set id.idRange) + SynMemberKind.PropertySet, Some(GetSetKeywords.Set id.idRange), None, $1 else raiseParseErrorAt (rhs parseState 1) (FSComp.SR.parsGetOrSetRequired())) } - | nameop COMMA nameop - { let (SynIdent(id, _)) = $1 - let (SynIdent(id2, _)) = $3 + | opt_access nameop COMMA opt_access nameop + { let (SynIdent(id, _)) = $2 + let (SynIdent(id2, _)) = $5 if not ((id.idText = "get" && id2.idText = "set") || (id.idText = "set" && id2.idText = "get")) then raiseParseErrorAt (rhs2 parseState 1 3) (FSComp.SR.parsGetOrSetRequired()) if id.idText = "get" then - SynMemberKind.PropertyGetSet, Some(GetSetKeywords.GetSet(id.idRange, id2.idRange)) + SynMemberKind.PropertyGetSet, Some(GetSetKeywords.GetSet(id.idRange, id2.idRange)), $1, $4 else - SynMemberKind.PropertyGetSet, Some(GetSetKeywords.GetSet(id2.idRange, id.idRange)) } + SynMemberKind.PropertyGetSet, Some(GetSetKeywords.GetSet(id2.idRange, id.idRange)), $4, $1 } - | nameop COMMA recover - { (let (SynIdent(id:Ident, _)) = $1 + | opt_access nameop COMMA recover + { (let (SynIdent(id:Ident, _)) = $2 if id.idText = "get" then - SynMemberKind.PropertyGet, Some(GetSetKeywords.Get id.idRange) + SynMemberKind.PropertyGet, Some(GetSetKeywords.Get id.idRange), $1, None else if id.idText = "set" then - SynMemberKind.PropertySet, Some(GetSetKeywords.Set id.idRange) + SynMemberKind.PropertySet, Some(GetSetKeywords.Set id.idRange), None, $1 else - raiseParseErrorAt (rhs parseState 1) (FSComp.SR.parsGetOrSetRequired())) } + raiseParseErrorAt (rhs parseState 2) (FSComp.SR.parsGetOrSetRequired())) } | OBLOCKBEGIN oblockend ODECLEND { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsIdentifierExpected()) - SynMemberKind.Member, None } + SynMemberKind.Member, None, None, None } memberSpecFlags: | memberFlags { $1 } @@ -1760,7 +1769,8 @@ tyconDefnRhs: { let m = lhs parseState let ty, arity = $3 (fun nameRange augmentation -> - let valSig = SynValSig([], (SynIdent(mkSynId m "Invoke", None)), inferredTyparDecls, ty, arity, false, false, PreXmlDoc.Empty, None, None, m, SynValSigTrivia.Zero) + let vis2 = SynValSigAccess.Single(None) + let valSig = SynValSig([], (SynIdent(mkSynId m "Invoke", None)), inferredTyparDecls, ty, arity, false, false, PreXmlDoc.Empty, vis2, None, m, SynValSigTrivia.Zero) let flags = AbstractMemberFlags true SynMemberKind.Member let invoke = SynMemberDefn.AbstractSlot(valSig, flags, m, SynMemberDefnAbstractSlotTrivia.Zero) if not (isNil augmentation) then raiseParseErrorAt m (FSComp.SR.parsAugmentationsIllegalOnDelegateType()) @@ -2036,7 +2046,7 @@ classDefnMember: | opt_attributes opt_access abstractMemberFlags opt_inline nameop opt_explicitValTyparDecls COLON topTypeWithTypeConstraints classMemberSpfnGetSet opt_ODECLEND { let ty, arity = $8 let isInline, doc, id, explicitValTyparDecls = (Option.isSome $4), grabXmlDoc(parseState, $1, 1), $5, $6 - let mWith, (getSet, getSetRangeOpt) = $9 + let mWith, (getSet, getSetRangeOpt, getterAccess, setterAccess) = $9 let getSetAdjuster arity = match arity, getSet with SynValInfo([], _), SynMemberKind.Member -> SynMemberKind.PropertyGet | _ -> getSet let mWhole = let m = rhs parseState 1 @@ -2044,10 +2054,12 @@ classDefnMember: | None -> unionRanges m ty.Range | Some gs -> unionRanges m gs.Range |> unionRangeWithXmlDoc doc - if Option.isSome $2 then errorR(Error(FSComp.SR.parsAccessibilityModsIllegalForAbstract(), mWhole)) + if Option.isSome $2 || Option.isSome getterAccess || Option.isSome setterAccess + then errorR(Error(FSComp.SR.parsAccessibilityModsIllegalForAbstract(), mWhole)) let mkFlags, leadingKeyword = $3 let trivia = { LeadingKeyword = leadingKeyword; InlineKeyword = $4; WithKeyword = mWith; EqualsRange = None } - let valSpfn = SynValSig($1, id, explicitValTyparDecls, ty, arity, isInline, false, doc, None, None, mWhole, trivia) + let vis2 = SynValSigAccess.Single(None) + let valSpfn = SynValSig($1, id, explicitValTyparDecls, ty, arity, isInline, false, doc, vis2, None, mWhole, trivia) let trivia: SynMemberDefnAbstractSlotTrivia = { GetSetKeywords = getSetRangeOpt } [ SynMemberDefn.AbstractSlot(valSpfn, mkFlags (getSetAdjuster arity), mWhole, trivia) ] } @@ -2183,7 +2195,7 @@ autoPropsDefnDecl: errorR (Error(FSComp.SR.parsMutableOnAutoPropertyShouldBeGetSet (), rhs parseState 2)) fun attribs flags rangeStart -> let xmlDoc = grabXmlDocAtRangeStart (parseState, attribs, rangeStart) - [ mkAutoPropDefn mVal $3 $4 $5 None expr (None, (SynMemberKind.Member, None)) xmlDoc attribs flags rangeStart ] } + [ mkAutoPropDefn mVal $3 $4 $5 None expr (None, (SynMemberKind.Member, None, None, None)) xmlDoc attribs flags rangeStart ] } | VAL opt_mutable opt_access ident opt_typ OBLOCKSEP { let mVal = rhs parseState 1 @@ -2196,7 +2208,7 @@ autoPropsDefnDecl: errorR (Error(FSComp.SR.parsMutableOnAutoPropertyShouldBeGetSet (), rhs parseState 2)) fun attribs flags rangeStart -> let xmlDoc = grabXmlDocAtRangeStart (parseState, attribs, rangeStart) - [ mkAutoPropDefn mVal $3 $4 $5 None expr (None, (SynMemberKind.Member, None)) xmlDoc attribs flags rangeStart ] } + [ mkAutoPropDefn mVal $3 $4 $5 None expr (None, (SynMemberKind.Member, None, None, None)) xmlDoc attribs flags rangeStart ] } | VAL opt_mutable opt_access recover { let mVal = rhs parseState 1 @@ -2206,7 +2218,7 @@ autoPropsDefnDecl: errorR (Error(FSComp.SR.parsMutableOnAutoPropertyShouldBeGetSet (), rhs parseState 2)) fun attribs flags rangeStart -> let xmlDoc = grabXmlDocAtRangeStart(parseState, attribs, rangeStart) - [ mkAutoPropDefn mVal $3 id None None expr (None, (SynMemberKind.Member, None)) xmlDoc attribs flags rangeStart ] } + [ mkAutoPropDefn mVal $3 id None None expr (None, (SynMemberKind.Member, None, None, None)) xmlDoc attribs flags rangeStart ] } /* An optional type on an auto-property definition */ opt_typ: diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf index dc578af9a99..d00017d2697 100644 --- a/src/Compiler/xlf/FSComp.txt.cs.xlf +++ b/src/Compiler/xlf/FSComp.txt.cs.xlf @@ -257,6 +257,11 @@ další převody orientované na typ + + Allow access modifiers to auto properties getters and setters + Allow access modifiers to auto properties getters and setters + + applicative computation expressions aplikativní výpočetní výrazy @@ -1177,6 +1182,11 @@ (Navržený název) + + Access modifiers cannot be applied to an SRTP constraint. + Access modifiers cannot be applied to an SRTP constraint. + + This active pattern expects {0} expression argument(s), e.g., '{1}{2}'. Tento aktivní vzor očekává tento počet argumentů výrazu: {0}, například {1}{2}. diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf index 0d5007fed66..2bf293d961c 100644 --- a/src/Compiler/xlf/FSComp.txt.de.xlf +++ b/src/Compiler/xlf/FSComp.txt.de.xlf @@ -257,6 +257,11 @@ zusätzliche typgesteuerte Konvertierungen + + Allow access modifiers to auto properties getters and setters + Allow access modifiers to auto properties getters and setters + + applicative computation expressions applikative Berechnungsausdrücke @@ -1177,6 +1182,11 @@ (Empfohlener Name) + + Access modifiers cannot be applied to an SRTP constraint. + Access modifiers cannot be applied to an SRTP constraint. + + This active pattern expects {0} expression argument(s), e.g., '{1}{2}'. Dieses aktive Muster erwartet {0} Ausdrucksargumente, z. B. „{1}{2}“. diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf index eee3b33c5c9..6923afa068f 100644 --- a/src/Compiler/xlf/FSComp.txt.es.xlf +++ b/src/Compiler/xlf/FSComp.txt.es.xlf @@ -257,6 +257,11 @@ conversiones adicionales dirigidas a tipos + + Allow access modifiers to auto properties getters and setters + Allow access modifiers to auto properties getters and setters + + applicative computation expressions expresiones de cálculo aplicativas @@ -1177,6 +1182,11 @@ (Nombre sugerido) + + Access modifiers cannot be applied to an SRTP constraint. + Access modifiers cannot be applied to an SRTP constraint. + + This active pattern expects {0} expression argument(s), e.g., '{1}{2}'. Este patrón activo espera {0} argumentos de expresión; por ejemplo, "{1}{2}". diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf index 37b8637fac1..4207041ad15 100644 --- a/src/Compiler/xlf/FSComp.txt.fr.xlf +++ b/src/Compiler/xlf/FSComp.txt.fr.xlf @@ -257,6 +257,11 @@ conversions supplémentaires dirigées vers le type + + Allow access modifiers to auto properties getters and setters + Allow access modifiers to auto properties getters and setters + + applicative computation expressions expressions de calcul applicatives @@ -1177,6 +1182,11 @@ (Nom suggéré) + + Access modifiers cannot be applied to an SRTP constraint. + Access modifiers cannot be applied to an SRTP constraint. + + This active pattern expects {0} expression argument(s), e.g., '{1}{2}'. Ce modèle actif attend {0} argument(s) d’expression, par exemple, '{1}{2}'. diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf index 45f773a03e8..9c2171b9217 100644 --- a/src/Compiler/xlf/FSComp.txt.it.xlf +++ b/src/Compiler/xlf/FSComp.txt.it.xlf @@ -257,6 +257,11 @@ conversioni aggiuntive dirette ai tipi + + Allow access modifiers to auto properties getters and setters + Allow access modifiers to auto properties getters and setters + + applicative computation expressions espressioni di calcolo applicativo @@ -1177,6 +1182,11 @@ (Nome consigliato) + + Access modifiers cannot be applied to an SRTP constraint. + Access modifiers cannot be applied to an SRTP constraint. + + This active pattern expects {0} expression argument(s), e.g., '{1}{2}'. Questo criterio attivo prevede {0} argomenti di espressione, ad esempio '{1}{2}'. diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf index c4b21520176..3ac536db2b4 100644 --- a/src/Compiler/xlf/FSComp.txt.ja.xlf +++ b/src/Compiler/xlf/FSComp.txt.ja.xlf @@ -257,6 +257,11 @@ その他の型指定された変換 + + Allow access modifiers to auto properties getters and setters + Allow access modifiers to auto properties getters and setters + + applicative computation expressions 適用できる計算式 @@ -1177,6 +1182,11 @@ (推奨される名前) + + Access modifiers cannot be applied to an SRTP constraint. + Access modifiers cannot be applied to an SRTP constraint. + + This active pattern expects {0} expression argument(s), e.g., '{1}{2}'. このアクティブ パターンには、{0} 式の引数が必要です (例: '{1}{2}')。 diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf index 00d19be0919..41047438142 100644 --- a/src/Compiler/xlf/FSComp.txt.ko.xlf +++ b/src/Compiler/xlf/FSComp.txt.ko.xlf @@ -257,6 +257,11 @@ 추가 형식-디렉션 변환 + + Allow access modifiers to auto properties getters and setters + Allow access modifiers to auto properties getters and setters + + applicative computation expressions 적용 가능한 계산 식 @@ -1177,6 +1182,11 @@ (제안된 이름) + + Access modifiers cannot be applied to an SRTP constraint. + Access modifiers cannot be applied to an SRTP constraint. + + This active pattern expects {0} expression argument(s), e.g., '{1}{2}'. 이 활성 패턴에는 {0} 식 인수(예: '{1}{2}')가 필요합니다. diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf index f9f8d75e2c0..9e64dbf33d8 100644 --- a/src/Compiler/xlf/FSComp.txt.pl.xlf +++ b/src/Compiler/xlf/FSComp.txt.pl.xlf @@ -257,6 +257,11 @@ dodatkowe konwersje ukierunkowane na typ + + Allow access modifiers to auto properties getters and setters + Allow access modifiers to auto properties getters and setters + + applicative computation expressions praktyczne wyrażenia obliczeniowe @@ -1177,6 +1182,11 @@ (Sugerowana nazwa) + + Access modifiers cannot be applied to an SRTP constraint. + Access modifiers cannot be applied to an SRTP constraint. + + This active pattern expects {0} expression argument(s), e.g., '{1}{2}'. Ten aktywny wzorzec oczekuje argumentów wyrażenia ({0}), np. „{1}{2}”. diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf index b6ecb582a3d..59330e37600 100644 --- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf +++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf @@ -257,6 +257,11 @@ conversões direcionadas por tipos adicionais + + Allow access modifiers to auto properties getters and setters + Allow access modifiers to auto properties getters and setters + + applicative computation expressions expressões de computação aplicáveis @@ -1177,6 +1182,11 @@ (Nome sugerido) + + Access modifiers cannot be applied to an SRTP constraint. + Access modifiers cannot be applied to an SRTP constraint. + + This active pattern expects {0} expression argument(s), e.g., '{1}{2}'. Este padrão ativo espera argumentos de expressão {0}, por exemplo, ''{1}{2}''. diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf index a55d1afade8..71995741697 100644 --- a/src/Compiler/xlf/FSComp.txt.ru.xlf +++ b/src/Compiler/xlf/FSComp.txt.ru.xlf @@ -257,6 +257,11 @@ дополнительные преобразования на основе типа + + Allow access modifiers to auto properties getters and setters + Allow access modifiers to auto properties getters and setters + + applicative computation expressions применимые вычислительные выражения @@ -1177,6 +1182,11 @@ (предложенное имя) + + Access modifiers cannot be applied to an SRTP constraint. + Access modifiers cannot be applied to an SRTP constraint. + + This active pattern expects {0} expression argument(s), e.g., '{1}{2}'. Этот активный шаблон ожидает аргументы выражения ({0}), например "{1}{2}". diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf index da224bfc0ee..4d6a7456a03 100644 --- a/src/Compiler/xlf/FSComp.txt.tr.xlf +++ b/src/Compiler/xlf/FSComp.txt.tr.xlf @@ -257,6 +257,11 @@ ek tür ile yönlendirilen dönüştürmeler + + Allow access modifiers to auto properties getters and setters + Allow access modifiers to auto properties getters and setters + + applicative computation expressions uygulama hesaplama ifadeleri @@ -1177,6 +1182,11 @@ (Önerilen ad) + + Access modifiers cannot be applied to an SRTP constraint. + Access modifiers cannot be applied to an SRTP constraint. + + This active pattern expects {0} expression argument(s), e.g., '{1}{2}'. Bu etkin desen, {0} ifade bağımsız değişkenlerini bekliyor, ör. '{1}{2}'. diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf index 26b945a8541..6d942aa6526 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf @@ -257,6 +257,11 @@ 附加类型定向转换 + + Allow access modifiers to auto properties getters and setters + Allow access modifiers to auto properties getters and setters + + applicative computation expressions 适用的计算表达式 @@ -1177,6 +1182,11 @@ (建议名称) + + Access modifiers cannot be applied to an SRTP constraint. + Access modifiers cannot be applied to an SRTP constraint. + + This active pattern expects {0} expression argument(s), e.g., '{1}{2}'. 此活动模式需要 {0} 个表达式参数,例如“{1}{2}”。 diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf index 16d8255e6aa..fa8f6a00187 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf @@ -257,6 +257,11 @@ 其他類型導向轉換 + + Allow access modifiers to auto properties getters and setters + Allow access modifiers to auto properties getters and setters + + applicative computation expressions 適用的計算運算式 @@ -1177,6 +1182,11 @@ (建議的名稱) + + Access modifiers cannot be applied to an SRTP constraint. + Access modifiers cannot be applied to an SRTP constraint. + + This active pattern expects {0} expression argument(s), e.g., '{1}{2}'. 此現用模式需要 {0} 運算式引數,例如 '{1}{2}'。 diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MethodsAndProperties/AutoPropsWithModifierBeforeGetSet.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MethodsAndProperties/AutoPropsWithModifierBeforeGetSet.fs new file mode 100644 index 00000000000..676746d96f5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MethodsAndProperties/AutoPropsWithModifierBeforeGetSet.fs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +module Conformance.BasicGrammarElements.AutoPropsWithModifierBeforeGetSet + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +let verifyCompile compilation = + compilation + |> asExe + |> withOptions ["--nowarn:988"] + |> compile + +let verifyCompileAndRun compilation = + compilation + |> asExe + |> withOptions ["--nowarn:988"] + |> compileAndRun + +[] +let ``Instance Properties Test`` () = + Fs """type InstancePropertiesTest() = + member val B1: int = 0 with get + // should fail + member val B2: int = 0 with set + member val B3: int = 0 with get, set + member val B4: int = 0 with internal get + // should fail + member val B5: int = 0 with internal set + member val B6: int = 0 with internal get, internal set + member val B7: int = 0 with internal get, set + member val B8: int = 0 with get, internal set + // should fail + member val internal B11: int = 0 with internal get, set + // should fail + member val internal B12: int = 0 with internal get + // should fail + member val internal B13: int = 0 with internal set + member val internal B14: int = 0 with get, set + member val internal B15: int = 0 with get + // should fail + member val internal B16: int = 0 with set""" + |> withLangVersionPreview + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 3135, Line 4, Col 33, Line 4, Col 36, "To indicate that this property can be set, use 'member val PropertyName = expr with get,set'.") + (Error 3135, Line 8, Col 42, Line 8, Col 45, "To indicate that this property can be set, use 'member val PropertyName = expr with get,set'.") + (Error 0558, Line 13, Col 43, Line 13, Col 51, "When the visibility for a property is specified, setting the visibility of the set or get method is not allowed.") + (Error 0558, Line 15, Col 43, Line 15, Col 51, "When the visibility for a property is specified, setting the visibility of the set or get method is not allowed.") + (Error 3135, Line 17, Col 52, Line 17, Col 55, "To indicate that this property can be set, use 'member val PropertyName = expr with get,set'.") + (Error 0558, Line 17, Col 43, Line 17, Col 51, "When the visibility for a property is specified, setting the visibility of the set or get method is not allowed.") + (Error 3135, Line 21, Col 43, Line 21, Col 46, "To indicate that this property can be set, use 'member val PropertyName = expr with get,set'.") + ] + +[] +let ``Static Properties Test`` () = + Fs """type StaticPropertiesTest() = + static member val B1: int = 0 with get + // should fail + static member val B2: int = 0 with set + static member val B3: int = 0 with get, set + static member val B4: int = 0 with internal get + // should fail + static member val B5: int = 0 with internal set + static member val B6: int = 0 with internal get, internal set + static member val B7: int = 0 with internal get, set + static member val B8: int = 0 with get, internal set + // should fail + static member val internal B11: int = 0 with internal get, set + // should fail + static member val internal B12: int = 0 with internal get + // should fail + static member val internal B13: int = 0 with internal set + static member val internal B14: int = 0 with get, set + static member val internal B15: int = 0 with get + // should fail + static member val internal B16: int = 0 with set""" + |> withLangVersionPreview + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 3135, Line 4, Col 40, Line 4, Col 43, "To indicate that this property can be set, use 'member val PropertyName = expr with get,set'.") + (Error 3135, Line 8, Col 49, Line 8, Col 52, "To indicate that this property can be set, use 'member val PropertyName = expr with get,set'.") + (Error 0558, Line 13, Col 50, Line 13, Col 58, "When the visibility for a property is specified, setting the visibility of the set or get method is not allowed.") + (Error 0558, Line 15, Col 50, Line 15, Col 58, "When the visibility for a property is specified, setting the visibility of the set or get method is not allowed.") + (Error 3135, Line 17, Col 59, Line 17, Col 62, "To indicate that this property can be set, use 'member val PropertyName = expr with get,set'.") + (Error 0558, Line 17, Col 50, Line 17, Col 58, "When the visibility for a property is specified, setting the visibility of the set or get method is not allowed.") + (Error 3135, Line 21, Col 50, Line 21, Col 53, "To indicate that this property can be set, use 'member val PropertyName = expr with get,set'.") + ] + +[] +let ``Abstract Properties Test: access modifiers are not allowed`` () = + Fs """type ``Abstract Properties Test`` = + abstract member B1: int with get, set + abstract member B2: int with get + abstract member B3: int with set + // should fail + abstract member B4: int with internal get, set + // should fail + abstract member B5: int with get, internal set + // should fail + abstract member B6: int with internal get, internal set + // should fail + abstract member B7: int with internal get + // should fail + abstract member B8: int with internal set""" + |> withLangVersionPreview + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 0561, Line 6, Col 5, Line 6, Col 51, "Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type.") + (Error 0561, Line 8, Col 5, Line 8, Col 51, "Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type.") + (Error 0561, Line 10, Col 5, Line 10, Col 60, "Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type.") + (Error 0561, Line 12, Col 5, Line 12, Col 46, "Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type.") + (Error 0561, Line 14, Col 5, Line 14, Col 46, "Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type.") + ] + +[] +let ``Signature File Test: no access modifiers before getter and setter`` () = + Fsi """module Program + +type A = + new: unit -> A + member internal B: int + member internal C: int with get, set + member D: int with internal get, private set + abstract E: int with get, set + abstract F: int with get, private set""" + |> withLangVersionPreview + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 240, Line 1, Col 1, Line 9, Col 42, "The signature file 'Program' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match.") + ] + +[] +let ``Signature And Implement File Test`` () = + let encodeFs = + FsSource """module Program + +type A() = + member val B: int = 0 with internal get, internal set + member val C: int = 0 with internal get, internal set + member val D: int = 0 with internal get, private set + member val E: int = 0 with internal get, private set""" + Fsi """module Program + +type A = + new: unit -> A + member internal B: int + member internal C: int with get, set + member D: int with internal get, private set + member E: int with get, set""" + |> withAdditionalSourceFile encodeFs + |> withLangVersionPreview + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 0034, Line 7, Col 16, Line 7, Col 17, "Module 'Program' contains + member A.E: int with private set +but its signature specifies + member A.E: int with set +The accessibility specified in the signature is more than that specified in the implementation") + (Error 0034, Line 7, Col 16, Line 7, Col 17, "Module 'Program' contains + member A.E: int with internal get +but its signature specifies + member A.E: int with get +The accessibility specified in the signature is more than that specified in the implementation") + ] + +[] +let ``Cannot use in F# 8.0`` () = + let encodeFs = + FsSource """module Program + +type A() = + member val B: int = 0 with internal get + member _.C with internal set (v: int) = () + member val D: int = 0 with internal get, private set""" + Fsi """module Program + +type A = + new: unit -> A + member B: int with internal get + member C: int with internal set + member D: int with internal get, private set""" + |> withAdditionalSourceFile encodeFs + |> withLangVersion80 + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 5, Col 24, Line 5, Col 32, "Feature 'Allow access modifiers to auto properties getters and setters' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 6, Col 24, Line 6, Col 32, "Feature 'Allow access modifiers to auto properties getters and setters' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 7, Col 24, Line 7, Col 32, "Feature 'Allow access modifiers to auto properties getters and setters' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 4, Col 32, Line 4, Col 40, "Feature 'Allow access modifiers to auto properties getters and setters' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 6, Col 32, Line 6, Col 40, "Feature 'Allow access modifiers to auto properties getters and setters' is not available in F# 8.0. Please use language version 'PREVIEW' or greater.") + ] diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs index aa959306198..a02ce93e498 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs @@ -1269,6 +1269,42 @@ type A () = |> withDiagnostics [ (Error 3867, Line 3, Col 21, Line 3, Col 22, "Classes cannot contain static abstract members.") ] + + [] + let ``Access modifiers cannot be applied to an SRTP constraint in preview`` () = + FSharp """ +let inline length (x: ^a when ^a: (member public Length: int)) = x.Length +let inline length2 (x: ^a when ^a: (member Length: int with public get)) = x.Length +let inline length3 (x: ^a when ^a: (member Length: int with public set)) = x.set_Length(1) +let inline length4 (x: ^a when ^a: (member public get_Length: unit -> int)) = x.get_Length() + """ + |> withLangVersionPreview + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 3869, Line 2, Col 43, Line 2, Col 49, "Access modifiers cannot be applied to an SRTP constraint.") + (Error 3869, Line 3, Col 61, Line 3, Col 67, "Access modifiers cannot be applied to an SRTP constraint.") + (Error 3869, Line 4, Col 61, Line 4, Col 67, "Access modifiers cannot be applied to an SRTP constraint.") + (Error 3869, Line 5, Col 44, Line 5, Col 50, "Access modifiers cannot be applied to an SRTP constraint.") + ] + + [] + let ``Access modifiers in an SRTP constraint generate warning in F# 8.0`` () = + FSharp """ +let inline length (x: ^a when ^a: (member public Length: int)) = x.Length +let inline length2 (x: ^a when ^a: (member Length: int with public get)) = x.Length +let inline length3 (x: ^a when ^a: (member Length: int with public set)) = x.set_Length(1) +let inline length4 (x: ^a when ^a: (member public get_Length: unit -> int)) = x.get_Length() + """ + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 3869, Line 2, Col 43, Line 2, Col 49, "Access modifiers cannot be applied to an SRTP constraint.") + (Warning 3869, Line 3, Col 61, Line 3, Col 67, "Access modifiers cannot be applied to an SRTP constraint.") + (Warning 3869, Line 4, Col 61, Line 4, Col 67, "Access modifiers cannot be applied to an SRTP constraint.") + (Warning 3869, Line 5, Col 44, Line 5, Col 50, "Access modifiers cannot be applied to an SRTP constraint.") + ] [] let ``Error for partial implementation of interface with static abstract members`` () = diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/Directives.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/Directives.fs index 95bd4e44933..b2c73b12b39 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/Directives.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/Directives.fs @@ -278,8 +278,7 @@ printfn "Hello, World" |> withDiagnostics[ (Warning 3353, Line 2, Col 9, Line 2, Col 11, "Invalid directive '#r '") (Warning 213, Line 3, Col 9, Line 3, Col 14, "'' is not a valid assembly name") - (Error 3869, Line 4, Col 12, Line 4, Col 17, "Unexpected identifier 'Ident'.") - (Error 3869, Line 5, Col 12, Line 5, Col 22, "Unexpected identifier 'Long.Ident'.") - (Error 3869, Line 6, Col 12, Line 6, Col 15, "Unexpected integer literal '123'.") + (Error 3870, Line 4, Col 12, Line 4, Col 17, "Unexpected identifier 'Ident'.") + (Error 3870, Line 5, Col 12, Line 5, Col 22, "Unexpected identifier 'Long.Ident'.") + (Error 3870, Line 6, Col 12, Line 6, Col 15, "Unexpected integer literal '123'.") ] - diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 0509d424f8b..007e3f23460 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -56,6 +56,7 @@ + diff --git a/tests/FSharp.Compiler.ComponentTests/Signatures/TestCasesForGenerationRoundTrip/property_access_modifiers.fsx b/tests/FSharp.Compiler.ComponentTests/Signatures/TestCasesForGenerationRoundTrip/property_access_modifiers.fsx new file mode 100644 index 00000000000..3da3294648b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Signatures/TestCasesForGenerationRoundTrip/property_access_modifiers.fsx @@ -0,0 +1,49 @@ +type A() = + static member StaticProperty1 with get() = 0 and set (_: int) = () + static member StaticProperty_public2 with public get() = 0 and set (_: int) = () + static member StaticProperty_public3 with get() = 0 and public set (_: int) = () + static member StaticProperty_public4 with public get() = 0 and public set (_: int) = () + static member StaticProperty_internal2 with internal get() = 0 and set (_: int) = () + static member StaticProperty_internal3 with get() = 0 and internal set (_: int) = () + static member StaticProperty_internal4 with internal get() = 0 and internal set (_: int) = () + static member StaticProperty_private2 with private get() = 0 and set (_: int) = () + static member StaticProperty_private3 with internal get() = 0 and private set (_: int) = () + static member StaticProperty_private4 with private get() = 0 and private set (_: int) = () + + member _.InstanceProperty1 with get() = 0 and set (_: int) = () + member _.InstanceProperty_public2 with public get() = 0 and set (_: int) = () + member _.InstanceProperty_public3 with get() = 0 and public set (_: int) = () + member _.InstanceProperty_public4 with public get() = 0 and public set (_: int) = () + member _.InstanceProperty_internal2 with internal get() = 0 and set (_: int) = () + member _.InstanceProperty_internal3 with get() = 0 and internal set (_: int) = () + member _.InstanceProperty_internal4 with internal get() = 0 and internal set (_: int) = () + member _.InstanceProperty_private2 with private get() = 0 and set (_: int) = () + member _.InstanceProperty_private3 with internal get() = 0 and private set (_: int) = () + member _.InstanceProperty_private4 with private get() = 0 and private set (_: int) = () + + static member StaticIndexer1 with get (_: int) = 0 and set (_: int) (_: int) = () + static member StaticIndexer_public2 with public get (_: int) = 0 and set (_: int) (_: int) = () + static member StaticIndexer_public3 with get (_: int) = 0 and public set (_: int) (_: int) = () + static member StaticIndexer_public4 with public get (_: int) = 0 and public set (_: int) (_: int) = () + static member StaticIndexer_internal2 with internal get (_: int) = 0 and set (_: int) (_: int) = () + static member StaticIndexer_internal3 with get (_: int) = 0 and internal set (_: int) (_: int) = () + static member StaticIndexer_internal4 with internal get (_: int) = 0 and internal set (_: int) (_: int) = () + static member StaticIndexer_private2 with private get (_: int) = 0 and set (_: int) (_: int) = () + static member StaticIndexer_private3 with internal get (_: int) = 0 and private set (_: int) (_: int) = () + static member StaticIndexer_private4 with private get (_: int) = 0 and private set (_: int) (_: int) = () + + member _.InstanceIndexer1 with get (_: int) = 0 and set (_: int) (_: int) = () + member _.InstanceIndexer_public2 with public get (_: int) = 0 and set (_: int) (_: int) = () + member _.InstanceIndexer_public3 with get (_: int) = 0 and public set (_: int) (_: int) = () + member _.InstanceIndexer_public4 with public get (_: int) = 0 and public set (_: int) (_: int) = () + member _.InstanceIndexer_internal2 with internal get (_: int) = 0 and set (_: int) (_: int) = () + member _.InstanceIndexer_internal3 with get (_: int) = 0 and internal set (_: int) (_: int) = () + member _.InstanceIndexer_internal4 with internal get (_: int) = 0 and internal set (_: int) (_: int) = () + member _.InstanceIndexer_private2 with private get (_: int) = 0 and set (_: int) (_: int) = () + member _.InstanceIndexer_private3 with internal get (_: int) = 0 and private set (_: int) (_: int) = () + member _.InstanceIndexer_private4 with private get (_: int) = 0 and private set (_: int) (_: int) = () + + abstract member AbstractProperty: int with get, set + default this.AbstractProperty with get () = 0 and set (_: int) = () + abstract member AbstractIndexer: int -> int with get, set + default this.AbstractIndexer with get (_: int) = 0 and set (_: int) (_: int) = () diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl index 4dd172f9462..949cad3a6a2 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -8004,6 +8004,8 @@ FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: FSharp.Compiler.Syntax.SynMem FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: FSharp.Compiler.Syntax.SynMemberFlags memberFlagsForSet FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: FSharp.Compiler.Syntax.SynMemberKind get_propKind() FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: FSharp.Compiler.Syntax.SynMemberKind propKind +FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: FSharp.Compiler.Syntax.SynValSigAccess accessibility +FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: FSharp.Compiler.Syntax.SynValSigAccess get_accessibility() FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: FSharp.Compiler.SyntaxTrivia.SynMemberDefnAutoPropertyTrivia get_trivia() FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: FSharp.Compiler.SyntaxTrivia.SynMemberDefnAutoPropertyTrivia trivia FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: FSharp.Compiler.Text.Range get_range() @@ -8012,8 +8014,6 @@ FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: FSharp.Compiler.Xml.PreXmlDoc FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: FSharp.Compiler.Xml.PreXmlDoc xmlDoc FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynAttributeList] attributes FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynAttributeList] get_attributes() -FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] accessibility -FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] get_accessibility() FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynType] get_typeOpt() FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynType] typeOpt FSharp.Compiler.Syntax.SynMemberDefn+GetSetMember: FSharp.Compiler.SyntaxTrivia.SynMemberGetSetTrivia get_trivia() @@ -8123,7 +8123,7 @@ FSharp.Compiler.Syntax.SynMemberDefn: Boolean get_IsNestedType() FSharp.Compiler.Syntax.SynMemberDefn: Boolean get_IsOpen() FSharp.Compiler.Syntax.SynMemberDefn: Boolean get_IsValField() FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewAbstractSlot(FSharp.Compiler.Syntax.SynValSig, FSharp.Compiler.Syntax.SynMemberFlags, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynMemberDefnAbstractSlotTrivia) -FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewAutoProperty(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynAttributeList], Boolean, FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynType], FSharp.Compiler.Syntax.SynMemberKind, FSharp.Compiler.Syntax.SynMemberFlags, FSharp.Compiler.Syntax.SynMemberFlags, FSharp.Compiler.Xml.PreXmlDoc, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynMemberDefnAutoPropertyTrivia) +FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewAutoProperty(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynAttributeList], Boolean, FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynType], FSharp.Compiler.Syntax.SynMemberKind, FSharp.Compiler.Syntax.SynMemberFlags, FSharp.Compiler.Syntax.SynMemberFlags, FSharp.Compiler.Xml.PreXmlDoc, FSharp.Compiler.Syntax.SynValSigAccess, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynMemberDefnAutoPropertyTrivia) FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewGetSetMember(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynBinding], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynBinding], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynMemberGetSetTrivia) FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewImplicitCtor(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynAttributeList], FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.Ident], FSharp.Compiler.Xml.PreXmlDoc, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynMemberDefnImplicitCtorTrivia) FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewImplicitInherit(FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Syntax.SynExpr, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.Ident], FSharp.Compiler.Text.Range) @@ -9772,7 +9772,9 @@ FSharp.Compiler.Syntax.SynValSig: FSharp.Compiler.Syntax.SynValInfo SynInfo FSharp.Compiler.Syntax.SynValSig: FSharp.Compiler.Syntax.SynValInfo arity FSharp.Compiler.Syntax.SynValSig: FSharp.Compiler.Syntax.SynValInfo get_SynInfo() FSharp.Compiler.Syntax.SynValSig: FSharp.Compiler.Syntax.SynValInfo get_arity() -FSharp.Compiler.Syntax.SynValSig: FSharp.Compiler.Syntax.SynValSig NewSynValSig(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynAttributeList], FSharp.Compiler.Syntax.SynIdent, FSharp.Compiler.Syntax.SynValTyparDecls, FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Syntax.SynValInfo, Boolean, Boolean, FSharp.Compiler.Xml.PreXmlDoc, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynExpr], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynValSigTrivia) +FSharp.Compiler.Syntax.SynValSig: FSharp.Compiler.Syntax.SynValSig NewSynValSig(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynAttributeList], FSharp.Compiler.Syntax.SynIdent, FSharp.Compiler.Syntax.SynValTyparDecls, FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Syntax.SynValInfo, Boolean, Boolean, FSharp.Compiler.Xml.PreXmlDoc, FSharp.Compiler.Syntax.SynValSigAccess, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynExpr], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynValSigTrivia) +FSharp.Compiler.Syntax.SynValSig: FSharp.Compiler.Syntax.SynValSigAccess accessibility +FSharp.Compiler.Syntax.SynValSig: FSharp.Compiler.Syntax.SynValSigAccess get_accessibility() FSharp.Compiler.Syntax.SynValSig: FSharp.Compiler.Syntax.SynValTyparDecls explicitTypeParams FSharp.Compiler.Syntax.SynValSig: FSharp.Compiler.Syntax.SynValTyparDecls get_explicitTypeParams() FSharp.Compiler.Syntax.SynValSig: FSharp.Compiler.SyntaxTrivia.SynValSigTrivia get_trivia() @@ -9787,11 +9789,33 @@ FSharp.Compiler.Syntax.SynValSig: Int32 Tag FSharp.Compiler.Syntax.SynValSig: Int32 get_Tag() FSharp.Compiler.Syntax.SynValSig: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynAttributeList] attributes FSharp.Compiler.Syntax.SynValSig: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynAttributeList] get_attributes() -FSharp.Compiler.Syntax.SynValSig: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] accessibility -FSharp.Compiler.Syntax.SynValSig: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] get_accessibility() FSharp.Compiler.Syntax.SynValSig: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynExpr] get_synExpr() FSharp.Compiler.Syntax.SynValSig: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynExpr] synExpr FSharp.Compiler.Syntax.SynValSig: System.String ToString() +FSharp.Compiler.Syntax.SynValSigAccess+GetSet: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] accessibility +FSharp.Compiler.Syntax.SynValSigAccess+GetSet: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] get_accessibility() +FSharp.Compiler.Syntax.SynValSigAccess+GetSet: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] get_getterAccessibility() +FSharp.Compiler.Syntax.SynValSigAccess+GetSet: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] get_setterAccessibility() +FSharp.Compiler.Syntax.SynValSigAccess+GetSet: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] getterAccessibility +FSharp.Compiler.Syntax.SynValSigAccess+GetSet: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] setterAccessibility +FSharp.Compiler.Syntax.SynValSigAccess+Single: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] accessibility +FSharp.Compiler.Syntax.SynValSigAccess+Single: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] get_accessibility() +FSharp.Compiler.Syntax.SynValSigAccess+Tags: Int32 GetSet +FSharp.Compiler.Syntax.SynValSigAccess+Tags: Int32 Single +FSharp.Compiler.Syntax.SynValSigAccess: Boolean IsGetSet +FSharp.Compiler.Syntax.SynValSigAccess: Boolean IsSingle +FSharp.Compiler.Syntax.SynValSigAccess: Boolean get_IsGetSet() +FSharp.Compiler.Syntax.SynValSigAccess: Boolean get_IsSingle() +FSharp.Compiler.Syntax.SynValSigAccess: FSharp.Compiler.Syntax.SynValSigAccess NewGetSet(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess]) +FSharp.Compiler.Syntax.SynValSigAccess: FSharp.Compiler.Syntax.SynValSigAccess NewSingle(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess]) +FSharp.Compiler.Syntax.SynValSigAccess: FSharp.Compiler.Syntax.SynValSigAccess+GetSet +FSharp.Compiler.Syntax.SynValSigAccess: FSharp.Compiler.Syntax.SynValSigAccess+Single +FSharp.Compiler.Syntax.SynValSigAccess: FSharp.Compiler.Syntax.SynValSigAccess+Tags +FSharp.Compiler.Syntax.SynValSigAccess: Int32 Tag +FSharp.Compiler.Syntax.SynValSigAccess: Int32 get_Tag() +FSharp.Compiler.Syntax.SynValSigAccess: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] SingleAccess() +FSharp.Compiler.Syntax.SynValSigAccess: System.String ToString() +FSharp.Compiler.Syntax.SynValSigAccess: System.Tuple`2[Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess],Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess]] GetSetAccessNoCheck() FSharp.Compiler.Syntax.SynValTyparDecls: Boolean canInfer FSharp.Compiler.Syntax.SynValTyparDecls: Boolean get_canInfer() FSharp.Compiler.Syntax.SynValTyparDecls: FSharp.Compiler.Syntax.SynValTyparDecls NewSynValTyparDecls(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynTyparDecls], Boolean) diff --git a/tests/service/data/SyntaxTree/CodeComment/BlockCommentInSourceCodeSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/CodeComment/BlockCommentInSourceCodeSignatureFile.fsi.bsl index 8c34100f9c3..977d7b388de 100644 --- a/tests/service/data/SyntaxTree/CodeComment/BlockCommentInSourceCodeSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/CodeComment/BlockCommentInSourceCodeSignatureFile.fsi.bsl @@ -9,12 +9,12 @@ SigFile ([], SynIdent (a, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), None, - None, (4,0--4,19), { LeadingKeyword = Val (4,0--4,3) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), (4,0--4,19))], - PreXmlDocEmpty, [], None, (2,0--4,19), - { LeadingKeyword = Namespace (2,0--2,9) })], + PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, None, (4,0--4,19), + { LeadingKeyword = Val (4,0--4,3) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (4,0--4,19))], PreXmlDocEmpty, [], + None, (2,0--4,19), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] CodeComments = [BlockComment (4,6--4,13)] }, set [])) diff --git a/tests/service/data/SyntaxTree/CodeComment/CommentAfterSourceCodeSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/CodeComment/CommentAfterSourceCodeSignatureFile.fsi.bsl index f5113a692c9..7b8fc685e00 100644 --- a/tests/service/data/SyntaxTree/CodeComment/CommentAfterSourceCodeSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/CodeComment/CommentAfterSourceCodeSignatureFile.fsi.bsl @@ -9,12 +9,12 @@ SigFile ([], SynIdent (foo, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), None, - None, (4,0--4,13), { LeadingKeyword = Val (4,0--4,3) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), (4,0--4,13))], - PreXmlDocEmpty, [], None, (2,0--4,13), - { LeadingKeyword = Namespace (2,0--2,9) })], + PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, None, (4,0--4,13), + { LeadingKeyword = Val (4,0--4,3) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (4,0--4,13))], PreXmlDocEmpty, [], + None, (2,0--4,13), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] CodeComments = [LineComment (4,14--4,25)] }, set [])) diff --git a/tests/service/data/SyntaxTree/CodeComment/CommentOnSingleLineSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/CodeComment/CommentOnSingleLineSignatureFile.fsi.bsl index c46b2288597..5dd445b4d00 100644 --- a/tests/service/data/SyntaxTree/CodeComment/CommentOnSingleLineSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/CodeComment/CommentOnSingleLineSignatureFile.fsi.bsl @@ -9,12 +9,12 @@ SigFile ([], SynIdent (a, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), None, - None, (4,0--4,10), { LeadingKeyword = Val (4,0--4,3) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), (4,0--4,10))], - PreXmlDocEmpty, [], None, (2,0--4,10), - { LeadingKeyword = Namespace (2,0--2,9) })], + PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, None, (4,0--4,10), + { LeadingKeyword = Val (4,0--4,3) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (4,0--4,10))], PreXmlDocEmpty, [], + None, (2,0--4,10), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] CodeComments = [LineComment (3,0--3,11)] }, set [])) diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTriviaSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTriviaSignatureFile.fsi.bsl index 1a134f725a6..bb8a2a87d75 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTriviaSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTriviaSignatureFile.fsi.bsl @@ -10,8 +10,8 @@ SigFile ([], SynIdent (v, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), None, - Some (Const (Int32 42, (10,4--10,6))), (4,0--10,6), + PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, Some (Const (Int32 42, (10,4--10,6))), (4,0--10,6), { LeadingKeyword = Val (4,0--4,3) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTriviaSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTriviaSignatureFile.fsi.bsl index bc7e09384dc..3a151928254 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTriviaSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTriviaSignatureFile.fsi.bsl @@ -10,7 +10,8 @@ SigFile ([], SynIdent (v, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([string], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), None, + PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, Some (Const (String diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfElseEndifSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfElseEndifSignatureFile.fsi.bsl index 92a493fa495..c1293f6c9c9 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfElseEndifSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfElseEndifSignatureFile.fsi.bsl @@ -9,8 +9,8 @@ SigFile ([], SynIdent (v, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), None, - Some (Const (Int32 3, (12,8--12,9))), (4,0--12,9), + PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, Some (Const (Int32 3, (12,8--12,9))), (4,0--12,9), { LeadingKeyword = Val (4,0--4,3) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfEndifWithComplexExpressionsSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfEndifWithComplexExpressionsSignatureFile.fsi.bsl index f9d1bda1da0..9f0375afada 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfEndifWithComplexExpressionsSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfEndifWithComplexExpressionsSignatureFile.fsi.bsl @@ -10,8 +10,8 @@ SigFile ([], SynIdent (v, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), None, - Some (Const (Int32 10, (12,4--12,6))), (4,0--12,6), + PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, Some (Const (Int32 10, (12,4--12,6))), (4,0--12,6), { LeadingKeyword = Val (4,0--4,3) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfElseEndifSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfElseEndifSignatureFile.fsi.bsl index c2e8d309225..4164c59cd03 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfElseEndifSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfElseEndifSignatureFile.fsi.bsl @@ -9,8 +9,8 @@ SigFile ([], SynIdent (v, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), None, - Some (Const (Int32 42, (8,4--8,6))), (4,0--8,6), + PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, Some (Const (Int32 42, (8,4--8,6))), (4,0--8,6), { LeadingKeyword = Val (4,0--4,3) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfEndifSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfEndifSignatureFile.fsi.bsl index eeb1f369f16..ea0a6308762 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfEndifSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfEndifSignatureFile.fsi.bsl @@ -9,8 +9,8 @@ SigFile ([], SynIdent (v, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), None, - Some (Const (Int32 42, (8,4--8,6))), (4,0--8,6), + PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, Some (Const (Int32 42, (8,4--8,6))), (4,0--8,6), { LeadingKeyword = Val (4,0--4,3) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Expression/SynExprObjWithSetter.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprObjWithSetter.fs.bsl index 8e4beda60ed..405f967b350 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprObjWithSetter.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprObjWithSetter.fs.bsl @@ -31,7 +31,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (4,4--4,54), + Single None, None, (4,4--4,54), { LeadingKeyword = Abstract (4,4--4,12) InlineKeyword = None WithKeyword = Some (4,46--4,50) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/AbstractKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/AbstractKeyword.fs.bsl index ddaab66cc68..9c4b593e133 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/AbstractKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/AbstractKeyword.fs.bsl @@ -20,7 +20,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (3,4--3,20), + Single None, None, (3,4--3,20), { LeadingKeyword = Abstract (3,4--3,12) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/AbstractMemberKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/AbstractMemberKeyword.fs.bsl index c1b55980388..0cbd9b3a434 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/AbstractMemberKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/AbstractMemberKeyword.fs.bsl @@ -20,7 +20,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (3,4--3,27), + Single None, None, (3,4--3,27), { LeadingKeyword = AbstractMember ((3,4--3,12), (3,13--3,19)) InlineKeyword = None diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/DefaultKeyword.fsi.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/DefaultKeyword.fsi.bsl index ad55bf28350..ba9b7296835 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/DefaultKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/DefaultKeyword.fsi.bsl @@ -20,7 +20,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (5,4--5,19), + Single None, None, (5,4--5,19), { LeadingKeyword = Default (5,4--5,11) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/DefaultValKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/DefaultValKeyword.fs.bsl index 0451b561b92..2c243f2ca9d 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/DefaultValKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/DefaultValKeyword.fs.bsl @@ -28,7 +28,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (3,26--3,27)), (3,4--3,27), + GetSet (None, None, None), + Const (Int32 1, (3,26--3,27)), (3,4--3,27), { LeadingKeyword = DefaultVal ((3,4--3,11), (3,12--3,15)) WithKeyword = None diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/MemberValKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/MemberValKeyword.fs.bsl index 7178d569385..63618be45b7 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/MemberValKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/MemberValKeyword.fs.bsl @@ -28,7 +28,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (3,25--3,26)), (3,4--3,26), + GetSet (None, None, None), + Const (Int32 1, (3,25--3,26)), (3,4--3,26), { LeadingKeyword = MemberVal ((3,4--3,10), (3,11--3,14)) WithKeyword = None diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/OverrideValKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/OverrideValKeyword.fs.bsl index 4d3005f29e3..3fff6cb5b0d 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/OverrideValKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/OverrideValKeyword.fs.bsl @@ -28,7 +28,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (3,27--3,28)), (3,4--3,28), + GetSet (None, None, None), + Const (Int32 1, (3,27--3,28)), (3,4--3,28), { LeadingKeyword = OverrideVal ((3,4--3,12), (3,13--3,16)) WithKeyword = None diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractKeyword.fs.bsl index 9c3c44b7405..92d3182daea 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractKeyword.fs.bsl @@ -24,7 +24,7 @@ ImplFile ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (3,4--3,34), + Single None, None, (3,4--3,34), { LeadingKeyword = StaticAbstract ((3,4--3,10), (3,11--3,19)) InlineKeyword = None diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractMemberKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractMemberKeyword.fs.bsl index 956ce98bf64..8b2dc3b5c8f 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractMemberKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractMemberKeyword.fs.bsl @@ -24,7 +24,7 @@ ImplFile ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (3,4--3,41), + Single None, None, (3,4--3,41), { LeadingKeyword = StaticAbstractMember ((3,4--3,10), (3,11--3,19), (3,20--3,26)) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/StaticMemberValKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/StaticMemberValKeyword.fs.bsl index 809096c0c78..1ce7e21fea2 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/StaticMemberValKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/StaticMemberValKeyword.fs.bsl @@ -28,7 +28,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (3,32--3,33)), (3,4--3,33), + GetSet (None, None, None), + Const (Int32 1, (3,32--3,33)), (3,4--3,33), { LeadingKeyword = StaticMemberVal ((3,4--3,10), (3,11--3,17), (3,18--3,21)) diff --git a/tests/service/data/SyntaxTree/Member/Abstract - Property 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Abstract - Property 01.fs.bsl index 31c0a27e211..9ec3b5452d7 100644 --- a/tests/service/data/SyntaxTree/Member/Abstract - Property 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Abstract - Property 01.fs.bsl @@ -20,7 +20,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (4,4--4,19), + Single None, None, (4,4--4,19), { LeadingKeyword = Abstract (4,4--4,12) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Member/Abstract - Property 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Abstract - Property 02.fs.bsl index b136527eb6b..95ced08879b 100644 --- a/tests/service/data/SyntaxTree/Member/Abstract - Property 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Abstract - Property 02.fs.bsl @@ -20,7 +20,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (4,4--4,33), + Single None, None, (4,4--4,33), { LeadingKeyword = Abstract (4,4--4,12) InlineKeyword = None WithKeyword = Some (4,20--4,24) diff --git a/tests/service/data/SyntaxTree/Member/Abstract - Property 03.fs.bsl b/tests/service/data/SyntaxTree/Member/Abstract - Property 03.fs.bsl index 436805d13e8..d9393dc8da0 100644 --- a/tests/service/data/SyntaxTree/Member/Abstract - Property 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Abstract - Property 03.fs.bsl @@ -20,7 +20,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (4,4--4,28), + Single None, None, (4,4--4,28), { LeadingKeyword = Abstract (4,4--4,12) InlineKeyword = None WithKeyword = Some (4,20--4,24) diff --git a/tests/service/data/SyntaxTree/Member/Abstract - Property 04.fs.bsl b/tests/service/data/SyntaxTree/Member/Abstract - Property 04.fs.bsl index c735d8780e8..f315032ac6c 100644 --- a/tests/service/data/SyntaxTree/Member/Abstract - Property 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Abstract - Property 04.fs.bsl @@ -20,7 +20,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (4,4--4,19), + Single None, None, (4,4--4,19), { LeadingKeyword = Abstract (4,4--4,12) InlineKeyword = None WithKeyword = Some (4,20--4,24) diff --git a/tests/service/data/SyntaxTree/Member/Abstract - Property 05.fs.bsl b/tests/service/data/SyntaxTree/Member/Abstract - Property 05.fs.bsl index ab66b9f2cff..e8092cae4f6 100644 --- a/tests/service/data/SyntaxTree/Member/Abstract - Property 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Abstract - Property 05.fs.bsl @@ -20,7 +20,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (4,4--4,20), + Single None, None, (4,4--4,20), { LeadingKeyword = Abstract (4,4--4,12) InlineKeyword = None WithKeyword = Some (4,21--4,25) @@ -40,7 +40,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (5,4--5,20), + Single None, None, (5,4--5,20), { LeadingKeyword = Abstract (5,4--5,12) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Member/Auto property 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 01.fs.bsl index 5155ca1b3e3..211a0fed943 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 01.fs.bsl @@ -27,7 +27,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (4,20--4,21)), (4,4--4,21), + GetSet (None, None, None), + Const (Int32 1, (4,20--4,21)), (4,4--4,21), { LeadingKeyword = MemberVal ((4,4--4,10), (4,11--4,14)) WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Member/Auto property 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 02.fs.bsl index af2cbcfa598..31f825ba1af 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 02.fs.bsl @@ -27,7 +27,7 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, + GetSet (None, None, None), ArbitraryAfterError ("typedSequentialExprBlock1", (4,19--4,19)), (4,4--4,19), diff --git a/tests/service/data/SyntaxTree/Member/Auto property 03.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 03.fs.bsl index 4dc2510f320..fced13abaa4 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 03.fs.bsl @@ -27,7 +27,7 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, + GetSet (None, None, None), ArbitraryAfterError ("typedSequentialExprBlock1", (4,19--4,19)), (4,4--4,19), @@ -51,7 +51,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 2, (5,20--5,21)), (5,4--5,21), + GetSet (None, None, None), + Const (Int32 2, (5,20--5,21)), (5,4--5,21), { LeadingKeyword = MemberVal ((5,4--5,10), (5,11--5,14)) WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Member/Auto property 04.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 04.fs.bsl index 9497c483352..19e8d589688 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 04.fs.bsl @@ -27,7 +27,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, ArbitraryAfterError ("autoProp2", (4,17--4,17)), + GetSet (None, None, None), + ArbitraryAfterError ("autoProp2", (4,17--4,17)), (4,4--4,17), { LeadingKeyword = MemberVal ((4,4--4,10), (4,11--4,14)) @@ -49,7 +50,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 2, (5,20--5,21)), (5,4--5,21), + GetSet (None, None, None), + Const (Int32 2, (5,20--5,21)), (5,4--5,21), { LeadingKeyword = MemberVal ((5,4--5,10), (5,11--5,14)) WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Member/Auto property 05.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 05.fs.bsl index 84a9f629f6e..ca97d03b523 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 05.fs.bsl @@ -27,7 +27,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, ArbitraryAfterError ("autoProp3", (4,14--4,14)), + GetSet (None, None, None), + ArbitraryAfterError ("autoProp3", (4,14--4,14)), (4,4--4,14), { LeadingKeyword = MemberVal ((4,4--4,10), (4,11--4,14)) @@ -49,7 +50,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 2, (5,20--5,21)), (5,4--5,21), + GetSet (None, None, None), + Const (Int32 2, (5,20--5,21)), (5,4--5,21), { LeadingKeyword = MemberVal ((5,4--5,10), (5,11--5,14)) WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Member/Auto property 06.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 06.fs.bsl index 50d5378bf80..6a60db20a73 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 06.fs.bsl @@ -27,7 +27,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (4,20--4,21)), (4,4--4,21), + GetSet (None, None, None), + Const (Int32 1, (4,20--4,21)), (4,4--4,21), { LeadingKeyword = MemberVal ((4,4--4,10), (4,11--4,14)) WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Member/Auto property 07.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 07.fs.bsl index 492124d31f0..8e6436d4eb4 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 07.fs.bsl @@ -32,7 +32,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 7, (4,24--4,25)), (4,4--4,38), + GetSet (None, None, None), + Const (Int32 7, (4,24--4,25)), (4,4--4,38), { LeadingKeyword = MemberVal ((4,4--4,10), (4,11--4,14)) WithKeyword = Some (4,26--4,30) diff --git a/tests/service/data/SyntaxTree/Member/Auto property 08.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 08.fs.bsl index 82805ec6df7..b4d9c9da2c4 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 08.fs.bsl @@ -27,7 +27,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (4,19--4,20)), (4,4--4,29), + GetSet (None, None, None), + Const (Int32 1, (4,19--4,20)), (4,4--4,29), { LeadingKeyword = MemberVal ((4,4--4,10), (4,11--4,14)) WithKeyword = Some (4,21--4,25) @@ -45,4 +46,4 @@ ImplFile (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:22). Try indenting this further. To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. -(6,0)-(6,1) parse error Incomplete structured construct at or before this point in member definition. Expected identifier, '(', '(*)' or other token. +(6,0)-(6,1) parse error Incomplete structured construct at or before this point. Expected identifier, '(', '(*)' or other token. diff --git a/tests/service/data/SyntaxTree/Member/Auto property 09.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 09.fs.bsl index 00760cf2537..5599ff4faa3 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 09.fs.bsl @@ -27,7 +27,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (4,20--4,21)), (4,4--4,30), + GetSet (None, None, None), + Const (Int32 1, (4,20--4,21)), (4,4--4,30), { LeadingKeyword = MemberVal ((4,4--4,10), (4,11--4,14)) WithKeyword = Some (4,22--4,26) @@ -68,4 +69,4 @@ ImplFile (5,4)-(5,10) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:23). Try indenting this further. To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. -(5,4)-(5,10) parse error Incomplete structured construct at or before this point in member definition. Expected identifier, '(', '(*)' or other token. +(5,4)-(5,10) parse error Incomplete structured construct at or before this point. Expected identifier, '(', '(*)' or other token. diff --git a/tests/service/data/SyntaxTree/Member/Auto property 10.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 10.fs.bsl index 1a61306fb2d..0a94591f95a 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 10.fs.bsl @@ -27,7 +27,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (4,19--4,20)), (4,4--4,29), + GetSet (None, None, None), + Const (Int32 1, (4,19--4,20)), (4,4--4,29), { LeadingKeyword = MemberVal ((4,4--4,10), (4,11--4,14)) WithKeyword = Some (4,21--4,25) @@ -44,4 +45,4 @@ ImplFile (5,0)-(5,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:22). Try indenting this further. To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. -(5,0)-(5,0) parse error Incomplete structured construct at or before this point in member definition. Expected identifier, '(', '(*)' or other token. +(5,0)-(5,0) parse error Incomplete structured construct at or before this point. Expected identifier, '(', '(*)' or other token. diff --git a/tests/service/data/SyntaxTree/Member/Auto property 11.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 11.fs.bsl index 14121127b62..f6f1fb9e52b 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 11.fs.bsl @@ -27,7 +27,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (4,19--4,20)), (4,4--4,29), + GetSet (None, None, None), + Const (Int32 1, (4,19--4,20)), (4,4--4,29), { LeadingKeyword = MemberVal ((4,4--4,10), (4,11--4,14)) WithKeyword = Some (4,21--4,25) diff --git a/tests/service/data/SyntaxTree/Member/Auto property 12.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 12.fs.bsl index d466718e4af..da5a5eb7b72 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 12.fs.bsl @@ -27,7 +27,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (4,19--4,20)), (4,4--4,20), + GetSet (None, None, None), + Const (Int32 1, (4,19--4,20)), (4,4--4,20), { LeadingKeyword = MemberVal ((4,4--4,10), (4,11--4,14)) WithKeyword = Some (4,21--4,25) diff --git a/tests/service/data/SyntaxTree/Member/Auto property 13.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 13.fs.bsl index d0c7a6c9dbc..b28a6d273bb 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 13.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 13.fs.bsl @@ -27,7 +27,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (4,19--4,20)), (4,4--4,20), + GetSet (None, None, None), + Const (Int32 1, (4,19--4,20)), (4,4--4,20), { LeadingKeyword = MemberVal ((4,4--4,10), (4,11--4,14)) WithKeyword = Some (4,21--4,25) diff --git a/tests/service/data/SyntaxTree/Member/Auto property 14.fs b/tests/service/data/SyntaxTree/Member/Auto property 14.fs new file mode 100644 index 00000000000..c69c16bcfbf --- /dev/null +++ b/tests/service/data/SyntaxTree/Member/Auto property 14.fs @@ -0,0 +1,4 @@ +module A + +type X() = + member val Y: int = 7 with public get, private set diff --git a/tests/service/data/SyntaxTree/Member/Auto property 14.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 14.fs.bsl new file mode 100644 index 00000000000..d9725daa923 --- /dev/null +++ b/tests/service/data/SyntaxTree/Member/Auto property 14.fs.bsl @@ -0,0 +1,57 @@ +ImplFile + (ParsedImplFileInput + ("/root/Member/Auto property 14.fs", false, QualifiedNameOfFile A, [], [], + [SynModuleOrNamespace + ([A], false, NamedModule, + [Types + ([SynTypeDefn + (SynComponentInfo + ([], None, [], [X], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + false, None, (3,5--3,6)), + ObjectModel + (Unspecified, + [ImplicitCtor + (None, [], Const (Unit, (3,6--3,8)), None, + PreXmlDoc ((3,6), FSharp.Compiler.Xml.XmlDocCollector), + (3,5--3,6), { AsKeyword = None }); + AutoProperty + ([], false, Y, + Some (LongIdent (SynLongIdent ([int], [], [None]))), + PropertyGetSet, + { IsInstance = true + IsDispatchSlot = false + IsOverrideOrExplicitImpl = false + IsFinal = false + GetterOrSetterIsCompilerGenerated = false + MemberKind = Member }, + { IsInstance = true + IsDispatchSlot = false + IsOverrideOrExplicitImpl = false + IsFinal = false + GetterOrSetterIsCompilerGenerated = false + MemberKind = PropertySet }, + PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), + GetSet + (None, Some (Public (4,31--4,37)), + Some (Private (4,43--4,50))), + Const (Int32 7, (4,24--4,25)), (4,4--4,54), + { LeadingKeyword = + MemberVal ((4,4--4,10), (4,11--4,14)) + WithKeyword = Some (4,26--4,30) + EqualsRange = Some (4,22--4,23) + GetSetKeywords = + Some (GetSet ((4,38--4,41), (4,51--4,54))) })], + (4,4--4,54)), [], + Some + (ImplicitCtor + (None, [], Const (Unit, (3,6--3,8)), None, + PreXmlDoc ((3,6), FSharp.Compiler.Xml.XmlDocCollector), + (3,5--3,6), { AsKeyword = None })), (3,5--4,54), + { LeadingKeyword = Type (3,0--3,4) + EqualsRange = Some (3,9--3,10) + WithKeyword = None })], (3,0--4,54))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--4,54), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Auto property 15.fs b/tests/service/data/SyntaxTree/Member/Auto property 15.fs new file mode 100644 index 00000000000..aedf83865d3 --- /dev/null +++ b/tests/service/data/SyntaxTree/Member/Auto property 15.fs @@ -0,0 +1,4 @@ +module A + +type X() = + member val internal Y: int = 7 with public get, private set diff --git a/tests/service/data/SyntaxTree/Member/Auto property 15.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 15.fs.bsl new file mode 100644 index 00000000000..417da42ef8a --- /dev/null +++ b/tests/service/data/SyntaxTree/Member/Auto property 15.fs.bsl @@ -0,0 +1,58 @@ +ImplFile + (ParsedImplFileInput + ("/root/Member/Auto property 15.fs", false, QualifiedNameOfFile A, [], [], + [SynModuleOrNamespace + ([A], false, NamedModule, + [Types + ([SynTypeDefn + (SynComponentInfo + ([], None, [], [X], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + false, None, (3,5--3,6)), + ObjectModel + (Unspecified, + [ImplicitCtor + (None, [], Const (Unit, (3,6--3,8)), None, + PreXmlDoc ((3,6), FSharp.Compiler.Xml.XmlDocCollector), + (3,5--3,6), { AsKeyword = None }); + AutoProperty + ([], false, Y, + Some (LongIdent (SynLongIdent ([int], [], [None]))), + PropertyGetSet, + { IsInstance = true + IsDispatchSlot = false + IsOverrideOrExplicitImpl = false + IsFinal = false + GetterOrSetterIsCompilerGenerated = false + MemberKind = Member }, + { IsInstance = true + IsDispatchSlot = false + IsOverrideOrExplicitImpl = false + IsFinal = false + GetterOrSetterIsCompilerGenerated = false + MemberKind = PropertySet }, + PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), + GetSet + (Some (Internal (4,15--4,23)), + Some (Public (4,40--4,46)), + Some (Private (4,52--4,59))), + Const (Int32 7, (4,33--4,34)), (4,4--4,63), + { LeadingKeyword = + MemberVal ((4,4--4,10), (4,11--4,14)) + WithKeyword = Some (4,35--4,39) + EqualsRange = Some (4,31--4,32) + GetSetKeywords = + Some (GetSet ((4,47--4,50), (4,60--4,63))) })], + (4,4--4,63)), [], + Some + (ImplicitCtor + (None, [], Const (Unit, (3,6--3,8)), None, + PreXmlDoc ((3,6), FSharp.Compiler.Xml.XmlDocCollector), + (3,5--3,6), { AsKeyword = None })), (3,5--4,63), + { LeadingKeyword = Type (3,0--3,4) + EqualsRange = Some (3,9--3,10) + WithKeyword = None })], (3,0--4,63))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--4,63), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Inherit 07.fsi.bsl b/tests/service/data/SyntaxTree/Member/Inherit 07.fsi.bsl index 434435dd0b8..7dc4657766f 100644 --- a/tests/service/data/SyntaxTree/Member/Inherit 07.fsi.bsl +++ b/tests/service/data/SyntaxTree/Member/Inherit 07.fsi.bsl @@ -20,7 +20,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((6,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (6,4--6,17), + Single None, None, (6,4--6,17), { LeadingKeyword = Member (6,4--6,10) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Member/SignatureMemberWithGet.fsi.bsl b/tests/service/data/SyntaxTree/Member/SignatureMemberWithGet.fsi.bsl index 83768766964..a516a7766cf 100644 --- a/tests/service/data/SyntaxTree/Member/SignatureMemberWithGet.fsi.bsl +++ b/tests/service/data/SyntaxTree/Member/SignatureMemberWithGet.fsi.bsl @@ -19,7 +19,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((6,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (6,4--8,35), + Single None, None, (6,4--8,35), { LeadingKeyword = Member (6,4--6,10) InlineKeyword = None WithKeyword = Some (7,20--7,24) diff --git a/tests/service/data/SyntaxTree/Member/SignatureMemberWithSet.fsi.bsl b/tests/service/data/SyntaxTree/Member/SignatureMemberWithSet.fsi.bsl index f2a745b5f3d..038b502e256 100644 --- a/tests/service/data/SyntaxTree/Member/SignatureMemberWithSet.fsi.bsl +++ b/tests/service/data/SyntaxTree/Member/SignatureMemberWithSet.fsi.bsl @@ -19,7 +19,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((6,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (6,4--8,31), + Single None, None, (6,4--8,31), { LeadingKeyword = Member (6,4--6,10) InlineKeyword = None WithKeyword = Some (7,20--7,24) diff --git a/tests/service/data/SyntaxTree/Member/SignatureMemberWithSetget.fsi.bsl b/tests/service/data/SyntaxTree/Member/SignatureMemberWithSetget.fsi.bsl index db84482f638..acb516b9113 100644 --- a/tests/service/data/SyntaxTree/Member/SignatureMemberWithSetget.fsi.bsl +++ b/tests/service/data/SyntaxTree/Member/SignatureMemberWithSetget.fsi.bsl @@ -20,7 +20,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((6,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (6,4--8,39), + Single None, None, (6,4--8,39), { LeadingKeyword = Member (6,4--6,10) InlineKeyword = None WithKeyword = Some (7,20--7,24) diff --git a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAbstractSlotContainsTheRangeOfTheWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAbstractSlotContainsTheRangeOfTheWithKeyword.fs.bsl index f3b24278efa..4158e55ca3f 100644 --- a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAbstractSlotContainsTheRangeOfTheWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAbstractSlotContainsTheRangeOfTheWithKeyword.fs.bsl @@ -27,7 +27,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (3,4--3,42), + Single None, None, (3,4--3,42), { LeadingKeyword = AbstractMember ((3,4--3,12), (3,13--3,19)) InlineKeyword = None diff --git a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheEqualsSign.fs.bsl index 7cfa4c283eb..06e0765a03b 100644 --- a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheEqualsSign.fs.bsl @@ -51,7 +51,7 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Ident name, (4,4--5,40), + GetSet (None, None, None), Ident name, (4,4--5,40), { LeadingKeyword = MemberVal ((5,4--5,10), (5,11--5,14)) WithKeyword = Some (5,27--5,31) diff --git a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheWithKeyword.fs.bsl index 0bef3c32697..95b26eac8a3 100644 --- a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheWithKeyword.fs.bsl @@ -34,7 +34,7 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Ident autoProp, (3,4--3,52), + GetSet (None, None, None), Ident autoProp, (3,4--3,52), { LeadingKeyword = MemberVal ((3,4--3,10), (3,11--3,14)) WithKeyword = Some (3,39--3,43) @@ -56,7 +56,7 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Ident autoProp, (4,4--4,39), + GetSet (None, None, None), Ident autoProp, (4,4--4,39), { LeadingKeyword = MemberVal ((4,4--4,10), (4,11--4,14)) WithKeyword = None diff --git a/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAbstractSlotHasCorrectKeyword.fs.bsl b/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAbstractSlotHasCorrectKeyword.fs.bsl index 378b47ad948..23d12756c3e 100644 --- a/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAbstractSlotHasCorrectKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAbstractSlotHasCorrectKeyword.fs.bsl @@ -20,7 +20,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (3,4--3,20), + Single None, None, (3,4--3,20), { LeadingKeyword = Abstract (3,4--3,12) InlineKeyword = None WithKeyword = None @@ -40,7 +40,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (4,4--4,26), + Single None, None, (4,4--4,26), { LeadingKeyword = AbstractMember ((4,4--4,12), (4,13--4,19)) InlineKeyword = None diff --git a/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAutoPropertyHasCorrectKeyword.fs.bsl b/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAutoPropertyHasCorrectKeyword.fs.bsl index f3b34e63689..76d6b9ac1b5 100644 --- a/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAutoPropertyHasCorrectKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAutoPropertyHasCorrectKeyword.fs.bsl @@ -28,7 +28,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (3,32--3,33)), (3,4--3,33), + GetSet (None, None, None), + Const (Int32 1, (3,32--3,33)), (3,4--3,33), { LeadingKeyword = StaticMemberVal ((3,4--3,10), (3,11--3,17), (3,18--3,21)) @@ -51,7 +52,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (4,25--4,26)), (4,4--4,26), + GetSet (None, None, None), + Const (Int32 1, (4,25--4,26)), (4,4--4,26), { LeadingKeyword = MemberVal ((4,4--4,10), (4,11--4,14)) WithKeyword = None @@ -73,7 +75,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 2, (5,27--5,28)), (5,4--5,28), + GetSet (None, None, None), + Const (Int32 2, (5,27--5,28)), (5,4--5,28), { LeadingKeyword = OverrideVal ((5,4--5,12), (5,13--5,16)) WithKeyword = None @@ -95,7 +98,8 @@ ImplFile GetterOrSetterIsCompilerGenerated = false MemberKind = PropertySet }, PreXmlDoc ((6,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Const (Int32 1, (6,26--6,27)), (6,4--6,27), + GetSet (None, None, None), + Const (Int32 1, (6,26--6,27)), (6,4--6,27), { LeadingKeyword = DefaultVal ((6,4--6,11), (6,12--6,15)) WithKeyword = None diff --git a/tests/service/data/SyntaxTree/MemberFlag/SynMemberSigMemberHasCorrectKeywords.fsi.bsl b/tests/service/data/SyntaxTree/MemberFlag/SynMemberSigMemberHasCorrectKeywords.fsi.bsl index 30cf09416b8..878187410bc 100644 --- a/tests/service/data/SyntaxTree/MemberFlag/SynMemberSigMemberHasCorrectKeywords.fsi.bsl +++ b/tests/service/data/SyntaxTree/MemberFlag/SynMemberSigMemberHasCorrectKeywords.fsi.bsl @@ -20,7 +20,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (5,4--5,20), + Single None, None, (5,4--5,20), { LeadingKeyword = Abstract (5,4--5,12) InlineKeyword = None WithKeyword = None @@ -40,7 +40,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((6,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (6,4--6,30), + Single None, None, (6,4--6,30), { LeadingKeyword = AbstractMember ((6,4--6,12), (6,13--6,19)) InlineKeyword = None @@ -61,7 +61,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((7,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (7,4--7,28), + Single None, None, (7,4--7,28), { LeadingKeyword = StaticMember ((7,4--7,10), (7,11--7,17)) InlineKeyword = None @@ -82,7 +82,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((8,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (8,4--8,18), + Single None, None, (8,4--8,18), { LeadingKeyword = Member (8,4--8,10) InlineKeyword = None WithKeyword = None @@ -102,7 +102,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((9,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (9,4--9,20), + Single None, None, (9,4--9,20), { LeadingKeyword = Override (9,4--9,12) InlineKeyword = None WithKeyword = None @@ -122,7 +122,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((10,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (10,4--10,19), + Single None, None, (10,4--10,19), { LeadingKeyword = Default (10,4--10,11) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/ModuleMember/Val 01.fsi.bsl b/tests/service/data/SyntaxTree/ModuleMember/Val 01.fsi.bsl index 1f89ce1c17a..33a28bec72c 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Val 01.fsi.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Val 01.fsi.bsl @@ -17,11 +17,12 @@ SigFile SynValInfo ([[SynArgInfo ([], false, None); SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), None, - None, (3,0--3,20), { LeadingKeyword = Val (3,0--3,3) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), (3,0--3,20))], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, None, (3,0--3,20), + { LeadingKeyword = Val (3,0--3,3) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (3,0--3,20))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,20), { LeadingKeyword = Module (1,0--1,6) })], { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleRangeShouldStartAtFirstAttribute.fsi.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleRangeShouldStartAtFirstAttribute.fsi.bsl index 892bcf3d4b5..833995c7304 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleRangeShouldStartAtFirstAttribute.fsi.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleRangeShouldStartAtFirstAttribute.fsi.bsl @@ -9,11 +9,12 @@ SigFile ([], SynIdent (s, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([string], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((5,0), FSharp.Compiler.Xml.XmlDocCollector), None, - None, (5,0--5,14), { LeadingKeyword = Val (5,0--5,3) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), (5,0--5,14))], + PreXmlDoc ((5,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, None, (5,0--5,14), + { LeadingKeyword = Val (5,0--5,3) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (5,0--5,14))], PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [{ Attributes = [{ TypeName = SynLongIdent ([Foo], [], [None]) ArgExpr = Const (Unit, (2,4--2,7)) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleShouldContainModuleKeyword.fsi.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleShouldContainModuleKeyword.fsi.bsl index 6871016694a..9c4dbafc6cd 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleShouldContainModuleKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleShouldContainModuleKeyword.fsi.bsl @@ -9,11 +9,12 @@ SigFile ([], SynIdent (a, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), None, - None, (4,0--4,10), { LeadingKeyword = Val (4,0--4,3) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), (4,0--4,10))], + PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, None, (4,0--4,10), + { LeadingKeyword = Val (4,0--4,3) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (4,0--4,10))], PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--4,10), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Namespace - Keyword 01.fsi.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Namespace - Keyword 01.fsi.bsl index 572fc320cb0..a2d8deea5fe 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Namespace - Keyword 01.fsi.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Namespace - Keyword 01.fsi.bsl @@ -15,11 +15,11 @@ SigFile LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (4,4--4,14), { LeadingKeyword = Val (4,4--4,7) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), - (4,4--4,14))], (3,0--4,14), + Single None, None, (4,4--4,14), + { LeadingKeyword = Val (4,4--4,7) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (4,4--4,14))], (3,0--4,14), { ModuleKeyword = Some (3,0--3,6) EqualsRange = Some (3,11--3,12) })], PreXmlDocEmpty, [], None, (1,0--4,14), { LeadingKeyword = Namespace (1,0--1,9) })], diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Nested module 01.fsi.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Nested module 01.fsi.bsl index d9ab53d2628..2ca7d9b108a 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Nested module 01.fsi.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Nested module 01.fsi.bsl @@ -15,22 +15,24 @@ SigFile LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (4,4--4,14), { LeadingKeyword = Val (4,4--4,7) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), - (4,4--4,14))], (3,0--4,14), { ModuleKeyword = Some (3,0--3,6) - EqualsRange = Some (3,9--3,10) }); + Single None, None, (4,4--4,14), + { LeadingKeyword = Val (4,4--4,7) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (4,4--4,14))], (3,0--4,14), + { ModuleKeyword = Some (3,0--3,6) + EqualsRange = Some (3,9--3,10) }); Val (SynValSig ([], SynIdent (b, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((6,0), FSharp.Compiler.Xml.XmlDocCollector), None, - None, (6,0--6,10), { LeadingKeyword = Val (6,0--6,3) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), (6,0--6,10))], + PreXmlDoc ((6,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, None, (6,0--6,10), + { LeadingKeyword = Val (6,0--6,3) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (6,0--6,10))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,10), { LeadingKeyword = Module (1,0--1,6) })], { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/NestedModule/IncompleteNestedModuleSigShouldBePresent.fsi.bsl b/tests/service/data/SyntaxTree/NestedModule/IncompleteNestedModuleSigShouldBePresent.fsi.bsl index 9c697d753d9..d9d1e49ae74 100644 --- a/tests/service/data/SyntaxTree/NestedModule/IncompleteNestedModuleSigShouldBePresent.fsi.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/IncompleteNestedModuleSigShouldBePresent.fsi.bsl @@ -16,11 +16,12 @@ SigFile ([], SynIdent (a, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([unit], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((5,0), FSharp.Compiler.Xml.XmlDocCollector), None, - None, (5,0--5,11), { LeadingKeyword = Val (5,0--5,3) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), (5,0--5,11))], + PreXmlDoc ((5,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, None, (5,0--5,11), + { LeadingKeyword = Val (5,0--5,3) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (5,0--5,11))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,11), { LeadingKeyword = Module (1,0--1,6) })], { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/NestedModule/NestedModuleWithBeginEndAndDecls.fsi.bsl b/tests/service/data/SyntaxTree/NestedModule/NestedModuleWithBeginEndAndDecls.fsi.bsl index 63876c52c8d..878125cde66 100644 --- a/tests/service/data/SyntaxTree/NestedModule/NestedModuleWithBeginEndAndDecls.fsi.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/NestedModuleWithBeginEndAndDecls.fsi.bsl @@ -15,11 +15,11 @@ SigFile LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (5,8--5,18), { LeadingKeyword = Val (5,8--5,11) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), - (5,8--5,18)); + Single None, None, (5,8--5,18), + { LeadingKeyword = Val (5,8--5,11) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (5,8--5,18)); Types ([SynTypeDefnSig (SynComponentInfo diff --git a/tests/service/data/SyntaxTree/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleSigDeclNestedModule.fsi.bsl b/tests/service/data/SyntaxTree/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleSigDeclNestedModule.fsi.bsl index 2fbd636ab28..2d2eb425be6 100644 --- a/tests/service/data/SyntaxTree/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleSigDeclNestedModule.fsi.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleSigDeclNestedModule.fsi.bsl @@ -21,11 +21,11 @@ SigFile LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((6,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (6,4--6,15), { LeadingKeyword = Val (6,4--6,7) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), - (6,4--6,15))], (4,0--6,15), + Single None, None, (6,4--6,15), + { LeadingKeyword = Val (6,4--6,7) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (6,4--6,15))], (4,0--6,15), { ModuleKeyword = Some (5,0--5,6) EqualsRange = Some (5,14--5,15) })], PreXmlDocEmpty, [], None, (2,0--6,15), { LeadingKeyword = Namespace (2,0--2,9) })], diff --git a/tests/service/data/SyntaxTree/NestedModule/RangeOfEqualSignShouldBePresentSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/NestedModule/RangeOfEqualSignShouldBePresentSignatureFile.fsi.bsl index 0343ec9ea71..d9575b21a86 100644 --- a/tests/service/data/SyntaxTree/NestedModule/RangeOfEqualSignShouldBePresentSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/RangeOfEqualSignShouldBePresentSignatureFile.fsi.bsl @@ -15,13 +15,13 @@ SigFile LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (5,4--5,17), { LeadingKeyword = Val (5,4--5,7) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), - (5,4--5,17))], (4,0--5,17), { ModuleKeyword = Some (4,0--4,6) - EqualsRange = Some (4,9--4,10) })], - PreXmlDocEmpty, [], None, (2,0--5,17), - { LeadingKeyword = Namespace (2,0--2,9) })], + Single None, None, (5,4--5,17), + { LeadingKeyword = Val (5,4--5,7) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (5,4--5,17))], (4,0--5,17), + { ModuleKeyword = Some (4,0--4,6) + EqualsRange = Some (4,9--4,10) })], PreXmlDocEmpty, [], None, + (2,0--5,17), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/NestedModule/RangeOfNestedModuleInSignatureFileShouldEndAtTheLastSynModuleSigDecl.fsi.bsl b/tests/service/data/SyntaxTree/NestedModule/RangeOfNestedModuleInSignatureFileShouldEndAtTheLastSynModuleSigDecl.fsi.bsl index b52c329f8c9..d1d8882f2a0 100644 --- a/tests/service/data/SyntaxTree/NestedModule/RangeOfNestedModuleInSignatureFileShouldEndAtTheLastSynModuleSigDecl.fsi.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/RangeOfNestedModuleInSignatureFileShouldEndAtTheLastSynModuleSigDecl.fsi.bsl @@ -125,7 +125,7 @@ SigFile SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((17,8), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (17,8--17,61), + Single None, None, (17,8--17,61), { LeadingKeyword = New (17,8--17,11) InlineKeyword = None WithKeyword = None @@ -145,7 +145,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((18,8), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (18,8--18,35), + Single None, None, (18,8--18,35), { LeadingKeyword = Member (18,8--18,14) InlineKeyword = None WithKeyword = Some (18,27--18,31) @@ -165,7 +165,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((19,8), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (19,8--19,35), + Single None, None, (19,8--19,35), { LeadingKeyword = Member (19,8--19,14) InlineKeyword = None WithKeyword = Some (19,27--19,31) @@ -185,7 +185,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((20,8), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (20,8--20,35), + Single None, None, (20,8--20,35), { LeadingKeyword = Member (20,8--20,14) InlineKeyword = None WithKeyword = Some (20,27--20,31) @@ -205,7 +205,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((21,8), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (21,8--21,35), + Single None, None, (21,8--21,35), { LeadingKeyword = Member (21,8--21,14) InlineKeyword = None WithKeyword = Some (21,27--21,31) @@ -429,7 +429,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((51,8), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (50,8--52,28), + Single None, None, (50,8--52,28), { LeadingKeyword = Member (52,8--52,14) InlineKeyword = None WithKeyword = None @@ -463,7 +463,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((54,8), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (53,8--55,28), + Single None, None, (53,8--55,28), { LeadingKeyword = Member (55,8--55,14) InlineKeyword = None WithKeyword = None @@ -496,7 +496,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((57,8), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (56,8--58,26), + Single None, None, (56,8--58,26), { LeadingKeyword = Member (58,8--58,14) InlineKeyword = None WithKeyword = None @@ -529,7 +529,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((60,8), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (59,8--61,26), + Single None, None, (59,8--61,26), { LeadingKeyword = Member (61,8--61,14) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Nullness/AbstractClassProperty.fs.bsl b/tests/service/data/SyntaxTree/Nullness/AbstractClassProperty.fs.bsl index a319c237e5d..11735a1d0c3 100644 --- a/tests/service/data/SyntaxTree/Nullness/AbstractClassProperty.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/AbstractClassProperty.fs.bsl @@ -33,7 +33,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((3,3), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (3,3--3,51), + Single None, None, (3,3--3,51), { LeadingKeyword = Abstract (3,3--3,11) InlineKeyword = None WithKeyword = Some (3,38--3,42) diff --git a/tests/service/data/SyntaxTree/Nullness/SignatureInAbstractMember.fs.bsl b/tests/service/data/SyntaxTree/Nullness/SignatureInAbstractMember.fs.bsl index f6aca925483..93923eb78f5 100644 --- a/tests/service/data/SyntaxTree/Nullness/SignatureInAbstractMember.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/SignatureInAbstractMember.fs.bsl @@ -34,7 +34,7 @@ ImplFile ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((2,3), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (2,3--2,61), + Single None, None, (2,3--2,61), { LeadingKeyword = AbstractMember ((2,3--2,11), (2,12--2,18)) InlineKeyword = None diff --git a/tests/service/data/SyntaxTree/OperatorName/OperatorNameInSynValSig.fsi.bsl b/tests/service/data/SyntaxTree/OperatorName/OperatorNameInSynValSig.fsi.bsl index 02c9a0c7194..b90adbf927e 100644 --- a/tests/service/data/SyntaxTree/OperatorName/OperatorNameInSynValSig.fsi.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/OperatorNameInSynValSig.fsi.bsl @@ -29,11 +29,12 @@ SigFile ([[SynArgInfo ([], false, Some e1)]; [SynArgInfo ([], false, Some e2)]], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), None, - None, (3,0--3,37), { LeadingKeyword = Val (3,0--3,3) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), (3,0--3,37))], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, None, (3,0--3,37), + { LeadingKeyword = Val (3,0--3,3) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (3,0--3,37))], PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--3,37), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/OperatorName/OperatorNameInValConstraint.fsi.bsl b/tests/service/data/SyntaxTree/OperatorName/OperatorNameInValConstraint.fsi.bsl index 9fc5a83a0d6..d31043ea99c 100644 --- a/tests/service/data/SyntaxTree/OperatorName/OperatorNameInValConstraint.fsi.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/OperatorNameInValConstraint.fsi.bsl @@ -44,7 +44,7 @@ SigFile ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((12,43), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (12,43--12,73), + Single None, None, (12,43--12,73), { LeadingKeyword = StaticMember ((12,43--12,49), (12,50--12,56)) InlineKeyword = None @@ -64,11 +64,12 @@ SigFile SynValInfo ([[SynArgInfo ([], false, Some n)]], SynArgInfo ([], false, None)), true, false, - PreXmlDoc ((12,4), FSharp.Compiler.Xml.XmlDocCollector), None, - None, (4,4--12,94), { LeadingKeyword = Val (12,4--12,7) - InlineKeyword = Some (12,8--12,14) - WithKeyword = None - EqualsRange = None }), (4,4--12,94))], + PreXmlDoc ((12,4), FSharp.Compiler.Xml.XmlDocCollector), + Single None, None, (4,4--12,94), + { LeadingKeyword = Val (12,4--12,7) + InlineKeyword = Some (12,8--12,14) + WithKeyword = None + EqualsRange = None }), (4,4--12,94))], PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [{ Attributes = [{ TypeName = SynLongIdent ([AutoOpen], [], [None]) ArgExpr = Const (Unit, (2,2--2,10)) diff --git a/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigMember.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigMember.fsi.bsl index 8cc11fd0aa8..ab9078c270c 100644 --- a/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigMember.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigMember.fsi.bsl @@ -20,7 +20,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Some (Const (Int32 10, (5,21--5,23))), + Single None, Some (Const (Int32 10, (5,21--5,23))), (5,4--5,23), { LeadingKeyword = Member (5,4--5,10) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigValue.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigValue.fsi.bsl index 59a3941fcf8..c63121096fa 100644 --- a/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigValue.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigValue.fsi.bsl @@ -9,8 +9,8 @@ SigFile ([], SynIdent (a, None), SynValTyparDecls (None, true), LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), None, - Some (Const (Int32 9, (4,14--4,15))), (4,0--4,15), + PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, Some (Const (Int32 9, (4,14--4,15))), (4,0--4,15), { LeadingKeyword = Val (4,0--4,3) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/SignatureType/MemberSigOfSynMemberSigMemberShouldContainsTheRangeOfTheWithKeyword.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/MemberSigOfSynMemberSigMemberShouldContainsTheRangeOfTheWithKeyword.fsi.bsl index 32b9b945708..493d3b104ad 100644 --- a/tests/service/data/SyntaxTree/SignatureType/MemberSigOfSynMemberSigMemberShouldContainsTheRangeOfTheWithKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/MemberSigOfSynMemberSigMemberShouldContainsTheRangeOfTheWithKeyword.fsi.bsl @@ -22,7 +22,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (5,4--5,42), + Single None, None, (5,4--5,42), { LeadingKeyword = AbstractMember ((5,4--5,12), (5,13--5,19)) InlineKeyword = None diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynValSpfnAndMember.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynValSpfnAndMember.fsi.bsl index f33e7aff10b..920c9e5a472 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynValSpfnAndMember.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynValSpfnAndMember.fsi.bsl @@ -27,7 +27,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (5,4--6,20), + Single None, None, (5,4--6,20), { LeadingKeyword = Abstract (6,4--6,12) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fsi.bsl index bf3950ebf3c..9788067cd7c 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fsi.bsl @@ -56,7 +56,7 @@ SigFile ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((12,8), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (12,8--12,42), + Single None, None, (12,8--12,42), { LeadingKeyword = Override (12,8--12,16) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfMembersShouldBeIncludedInSynExceptionSigAndSynModuleSigDeclException.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfMembersShouldBeIncludedInSynExceptionSigAndSynModuleSigDeclException.fsi.bsl index 8a7477a0400..7025f3aadc2 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfMembersShouldBeIncludedInSynExceptionSigAndSynModuleSigDeclException.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfMembersShouldBeIncludedInSynExceptionSigAndSynModuleSigDeclException.fsi.bsl @@ -38,7 +38,7 @@ SigFile ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (5,4--5,30), + Single None, None, (5,4--5,30), { LeadingKeyword = Member (5,4--5,10) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigDelegateOfShouldStartFromName.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigDelegateOfShouldStartFromName.fsi.bsl index c108329122d..0dcb3eb2e73 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigDelegateOfShouldStartFromName.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigDelegateOfShouldStartFromName.fsi.bsl @@ -31,7 +31,7 @@ SigFile SynValInfo ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, - PreXmlDocEmpty, None, None, (4,4--4,29), + PreXmlDocEmpty, Single None, None, (4,4--4,29), { LeadingKeyword = Synthetic InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigObjectModelShouldEndAtLastMember.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigObjectModelShouldEndAtLastMember.fsi.bsl index 606ac16584e..4ed17f26304 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigObjectModelShouldEndAtLastMember.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigObjectModelShouldEndAtLastMember.fsi.bsl @@ -24,7 +24,7 @@ SigFile ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((6,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (6,4--6,30), + Single None, None, (6,4--6,30), { LeadingKeyword = Member (6,4--6,10) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigRecordShouldEndAtLastMember.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigRecordShouldEndAtLastMember.fsi.bsl index d0fe920321f..553c900522d 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigRecordShouldEndAtLastMember.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigRecordShouldEndAtLastMember.fsi.bsl @@ -33,7 +33,7 @@ SigFile ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (5,4--5,30), + Single None, None, (5,4--5,30), { LeadingKeyword = Member (5,4--5,10) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/SignatureType/SynExceptionSigShouldContainsTheRangeOfTheWithKeyword.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/SynExceptionSigShouldContainsTheRangeOfTheWithKeyword.fsi.bsl index cca175bb158..ef541678686 100644 --- a/tests/service/data/SyntaxTree/SignatureType/SynExceptionSigShouldContainsTheRangeOfTheWithKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/SynExceptionSigShouldContainsTheRangeOfTheWithKeyword.fsi.bsl @@ -25,7 +25,7 @@ SigFile ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (5,4--5,29), + Single None, None, (5,4--5,29), { LeadingKeyword = Member (5,4--5,10) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fsi.bsl index f14e2162303..25b5feb9ae6 100644 --- a/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fsi.bsl @@ -32,7 +32,7 @@ SigFile SynValInfo ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, - PreXmlDocEmpty, None, None, (4,9--4,37), + PreXmlDocEmpty, Single None, None, (4,9--4,37), { LeadingKeyword = Synthetic InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/SignatureType/SynValSigContainsParameterNames.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/SynValSigContainsParameterNames.fsi.bsl index f9188e9c481..edb06fea795 100644 --- a/tests/service/data/SyntaxTree/SignatureType/SynValSigContainsParameterNames.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/SynValSigContainsParameterNames.fsi.bsl @@ -58,11 +58,12 @@ SigFile SynArgInfo ([], false, Some origRhsExpr)]; [SynArgInfo ([], false, Some x)]], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), None, - None, (3,0--6,23), { LeadingKeyword = Val (3,0--3,3) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), (3,0--6,23))], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, None, (3,0--6,23), + { LeadingKeyword = Val (3,0--3,3) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (3,0--6,23))], PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--6,23), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/SignatureType/TriviaIsPresentInSynTypeDefnSig.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/TriviaIsPresentInSynTypeDefnSig.fsi.bsl index 7d966890f27..53962cae2b9 100644 --- a/tests/service/data/SyntaxTree/SignatureType/TriviaIsPresentInSynTypeDefnSig.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/TriviaIsPresentInSynTypeDefnSig.fsi.bsl @@ -20,7 +20,7 @@ SigFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, Some (Const (Int32 10, (5,21--5,23))), + Single None, Some (Const (Int32 10, (5,21--5,23))), (5,4--5,23), { LeadingKeyword = Member (5,4--5,10) InlineKeyword = None WithKeyword = None @@ -66,7 +66,7 @@ SigFile ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((15,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (15,4--15,32), + Single None, None, (15,4--15,32), { LeadingKeyword = StaticMember ((15,4--15,10), (15,11--15,17)) InlineKeyword = None diff --git a/tests/service/data/SyntaxTree/SignatureType/ValKeywordIsPresentInSynValSig.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/ValKeywordIsPresentInSynValSig.fsi.bsl index fb5865e0b04..599315bef28 100644 --- a/tests/service/data/SyntaxTree/SignatureType/ValKeywordIsPresentInSynValSig.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/ValKeywordIsPresentInSynValSig.fsi.bsl @@ -15,11 +15,12 @@ SigFile SynValTyparDecls (None, true), LongIdent (SynLongIdent ([int], [], [None])), SynValInfo ([], SynArgInfo ([], false, None)), false, false, - PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), None, - None, (4,0--6,11), { LeadingKeyword = Val (6,0--6,3) - InlineKeyword = None - WithKeyword = None - EqualsRange = None }), (4,0--6,11))], + PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, None, (4,0--6,11), + { LeadingKeyword = Val (6,0--6,3) + InlineKeyword = None + WithKeyword = None + EqualsRange = None }), (4,0--6,11))], PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--6,11), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/SignatureType/With 01.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/With 01.fsi.bsl index 07be5d42776..f6ef4571fd9 100644 --- a/tests/service/data/SyntaxTree/SignatureType/With 01.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/With 01.fsi.bsl @@ -21,7 +21,7 @@ SigFile ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (4,4--4,28), + Single None, None, (4,4--4,28), { LeadingKeyword = Member (4,4--4,10) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/SynType/Constraint intersection 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Constraint intersection 03.fs.bsl index ada151dacf1..f28ed328e25 100644 --- a/tests/service/data/SyntaxTree/SynType/Constraint intersection 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Constraint intersection 03.fs.bsl @@ -44,7 +44,7 @@ ImplFile ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (4,4--4,53), + Single None, None, (4,4--4,53), { LeadingKeyword = Abstract (4,4--4,12) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/SynType/NestedSynTypeOrInsideSynExprTraitCall.fs.bsl b/tests/service/data/SyntaxTree/SynType/NestedSynTypeOrInsideSynExprTraitCall.fs.bsl index 7782c254288..1c58087b0d8 100644 --- a/tests/service/data/SyntaxTree/SynType/NestedSynTypeOrInsideSynExprTraitCall.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/NestedSynTypeOrInsideSynExprTraitCall.fs.bsl @@ -81,7 +81,7 @@ ImplFile SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((2,56), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (2,56--2,96), + Single None, None, (2,56--2,96), { LeadingKeyword = StaticMember ((2,56--2,62), (2,63--2,69)) InlineKeyword = None diff --git a/tests/service/data/SyntaxTree/SynType/SingleSynTypeInsideSynExprTraitCall.fs.bsl b/tests/service/data/SyntaxTree/SynType/SingleSynTypeInsideSynExprTraitCall.fs.bsl index 9ed3e51aa43..5c1cd55a5bf 100644 --- a/tests/service/data/SyntaxTree/SynType/SingleSynTypeInsideSynExprTraitCall.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/SingleSynTypeInsideSynExprTraitCall.fs.bsl @@ -85,7 +85,8 @@ ImplFile ([], false, None)), false, false, PreXmlDoc ((3,55), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (3,55--3,91), + Single None, None, + (3,55--3,91), { LeadingKeyword = StaticMember ((3,55--3,61), @@ -158,7 +159,7 @@ ImplFile SynArgInfo ([], false, None)), false, false, PreXmlDoc ((4,15), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (4,15--4,51), + Single None, None, (4,15--4,51), { LeadingKeyword = StaticMember ((4,15--4,21), (4,22--4,28)) diff --git a/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynExprTraitCall.fs.bsl b/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynExprTraitCall.fs.bsl index 370e07d5746..24fb731523f 100644 --- a/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynExprTraitCall.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynExprTraitCall.fs.bsl @@ -58,7 +58,7 @@ ImplFile ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((2,45), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (2,45--2,80), + Single None, None, (2,45--2,80), { LeadingKeyword = StaticMember ((2,45--2,51), (2,52--2,58)) InlineKeyword = None diff --git a/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynTypeConstraintWhereTyparSupportsMember.fs.bsl b/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynTypeConstraintWhereTyparSupportsMember.fs.bsl index 5b687420cb8..c2de9ccff5c 100644 --- a/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynTypeConstraintWhereTyparSupportsMember.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynTypeConstraintWhereTyparSupportsMember.fs.bsl @@ -55,7 +55,7 @@ ImplFile SynArgInfo ([], false, None)), false, false, PreXmlDoc ((2,56), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (2,56--2,94), + Single None, None, (2,56--2,94), { LeadingKeyword = StaticMember ((2,56--2,62), (2,63--2,69)) diff --git a/tests/service/data/SyntaxTree/SynType/SynTypeOrWithAppTypeOnTheRightHandSide.fs.bsl b/tests/service/data/SyntaxTree/SynType/SynTypeOrWithAppTypeOnTheRightHandSide.fs.bsl index 0ee54488a53..f509494f211 100644 --- a/tests/service/data/SyntaxTree/SynType/SynTypeOrWithAppTypeOnTheRightHandSide.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/SynTypeOrWithAppTypeOnTheRightHandSide.fs.bsl @@ -40,7 +40,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((2,39), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (2,39--2,59), + Single None, None, (2,39--2,59), { LeadingKeyword = StaticMember ((2,39--2,45), (2,46--2,52)) InlineKeyword = None diff --git a/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterAttributes.fsi.bsl b/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterAttributes.fsi.bsl index f3d59669f94..6d0202252ea 100644 --- a/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterAttributes.fsi.bsl +++ b/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterAttributes.fsi.bsl @@ -75,7 +75,7 @@ SigFile Range = (3,36--3,54) }], false, None)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (3,4--3,63), + Single None, None, (3,4--3,63), { LeadingKeyword = Member (3,4--3,10) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterName.fsi.bsl b/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterName.fsi.bsl index 2b3ede584bc..662002f0c87 100644 --- a/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterName.fsi.bsl +++ b/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterName.fsi.bsl @@ -38,7 +38,7 @@ SigFile SynArgInfo ([], false, Some p2)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (3,4--3,34), + Single None, None, (3,4--3,34), { LeadingKeyword = Member (3,4--3,10) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Type/AttributesInOptionalNamedMemberParameter.fs.bsl b/tests/service/data/SyntaxTree/Type/AttributesInOptionalNamedMemberParameter.fs.bsl index 1905684969e..6ed7fe97af5 100644 --- a/tests/service/data/SyntaxTree/Type/AttributesInOptionalNamedMemberParameter.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/AttributesInOptionalNamedMemberParameter.fs.bsl @@ -54,7 +54,7 @@ ImplFile Range = (3,23--3,35) }], true, Some a)]], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (3,4--3,46), + Single None, None, (3,4--3,46), { LeadingKeyword = AbstractMember ((3,4--3,12), (3,13--3,19)) InlineKeyword = None diff --git a/tests/service/data/SyntaxTree/Type/Interface 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Interface 03.fs.bsl index b93004493d6..beaa9fae234 100644 --- a/tests/service/data/SyntaxTree/Type/Interface 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Interface 03.fs.bsl @@ -19,7 +19,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (5,8--5,23), + Single None, None, (5,8--5,23), { LeadingKeyword = Abstract (5,8--5,16) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Type/Interface 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Interface 04.fs.bsl index 1a6d2a60721..3c5776cc025 100644 --- a/tests/service/data/SyntaxTree/Type/Interface 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Interface 04.fs.bsl @@ -19,7 +19,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (4,4--4,19), + Single None, None, (4,4--4,19), { LeadingKeyword = Abstract (4,4--4,12) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Type/Interface 07.fs.bsl b/tests/service/data/SyntaxTree/Type/Interface 07.fs.bsl index 2030a97bf39..7776c39507b 100644 --- a/tests/service/data/SyntaxTree/Type/Interface 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Interface 07.fs.bsl @@ -21,7 +21,7 @@ ImplFile SynValInfo ([], SynArgInfo ([], false, None)), false, false, PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector), - None, None, (5,4--5,19), + Single None, None, (5,4--5,19), { LeadingKeyword = Abstract (5,4--5,12) InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Type/NamedParametersInDelegateType.fs.bsl b/tests/service/data/SyntaxTree/Type/NamedParametersInDelegateType.fs.bsl index 2ea13523d2b..daea0ab5026 100644 --- a/tests/service/data/SyntaxTree/Type/NamedParametersInDelegateType.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/NamedParametersInDelegateType.fs.bsl @@ -70,7 +70,7 @@ ImplFile SynArgInfo ([], false, Some b)]; [SynArgInfo ([], false, Some c)]], SynArgInfo ([], false, None)), false, false, - PreXmlDocEmpty, None, None, (2,11--2,46), + PreXmlDocEmpty, Single None, None, (2,11--2,46), { LeadingKeyword = Synthetic InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fs.bsl index ba653244455..3809962658a 100644 --- a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fs.bsl @@ -34,7 +34,7 @@ ImplFile SynValInfo ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), false, false, - PreXmlDocEmpty, None, None, (2,9--2,37), + PreXmlDocEmpty, Single None, None, (2,9--2,37), { LeadingKeyword = Synthetic InlineKeyword = None WithKeyword = None diff --git a/tests/service/data/SyntaxTree/Val/InlineKeyword.fsi.bsl b/tests/service/data/SyntaxTree/Val/InlineKeyword.fsi.bsl index 62ae58c5ad0..8c04d7ba275 100644 --- a/tests/service/data/SyntaxTree/Val/InlineKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/Val/InlineKeyword.fsi.bsl @@ -13,12 +13,12 @@ SigFile SynValInfo ([[SynArgInfo ([], false, None)]], SynArgInfo ([], false, None)), true, false, - PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), None, - None, (4,0--4,26), { LeadingKeyword = Val (4,0--4,3) - InlineKeyword = Some (4,4--4,10) - WithKeyword = None - EqualsRange = None }), (4,0--4,26))], - PreXmlDocEmpty, [], None, (2,0--4,26), - { LeadingKeyword = Namespace (2,0--2,9) })], + PreXmlDoc ((4,0), FSharp.Compiler.Xml.XmlDocCollector), + Single None, None, (4,0--4,26), + { LeadingKeyword = Val (4,0--4,3) + InlineKeyword = Some (4,4--4,10) + WithKeyword = None + EqualsRange = None }), (4,0--4,26))], PreXmlDocEmpty, [], + None, (2,0--4,26), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] CodeComments = [] }, set []))