-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The 'member' keyword gets deleted in 'abstract member' declarations #1106
Comments
This is a bit historical I think. In short in case of implementation files, it will lead to the same compiled code. Take for example: module Example
type Foo =
abstract member bar : int
type Foo2 =
abstract member bar : int ParsedInput.ImplFile
(ParsedImplFileInput
("tmp.fsx", true, QualifiedNameOfFile Example$fsx, [], [],
[SynModuleOrNamespace
([Example], false, NamedModule,
[SynModuleDecl.Types
([TypeDefn
(ComponentInfo
([], [], [], [Foo],
PreXmlDoc ((3,8), FSharp.Compiler.XmlDoc+XmlDocCollector),
false, None, tmp.fsx (3,5--3,8) IsSynthetic=false),
SynTypeDefnRepr.ObjectModel
(TyconUnspecified,
[SynMemberDefn.AbstractSlot
(ValSpfn
([], bar, SynValTyparDecls ([], true, []),
SynType.LongIdent (LongIdentWithDots ([int], [])),
SynValInfo ([], SynArgInfo ([], false, None)), false,
false,
PreXmlDoc
((4,19), FSharp.Compiler.XmlDoc+XmlDocCollector),
None, None, tmp.fsx (4,4--4,29) IsSynthetic=false),
{ IsInstance = true
IsDispatchSlot = true
IsOverrideOrExplicitImpl = false
IsFinal = false
MemberKind = MemberKind.PropertyGet },
tmp.fsx (4,4--4,29) IsSynthetic=false)],
tmp.fsx (4,4--4,29) IsSynthetic=false), [],
tmp.fsx (3,5--4,29) IsSynthetic=false)],
tmp.fsx (3,0--4,29) IsSynthetic=false);
SynModuleDecl.Types
([TypeDefn
(ComponentInfo
([], [], [], [Foo2],
PreXmlDoc ((6,9), FSharp.Compiler.XmlDoc+XmlDocCollector),
false, None, tmp.fsx (6,5--6,9) IsSynthetic=false),
SynTypeDefnRepr.ObjectModel
(TyconUnspecified,
[SynMemberDefn.AbstractSlot
(ValSpfn
([], bar, SynValTyparDecls ([], true, []),
SynType.LongIdent (LongIdentWithDots ([int], [])),
SynValInfo ([], SynArgInfo ([], false, None)), false,
false,
PreXmlDoc
((7,19), FSharp.Compiler.XmlDoc+XmlDocCollector),
None, None, tmp.fsx (7,4--7,29) IsSynthetic=false),
{ IsInstance = true
IsDispatchSlot = true
IsOverrideOrExplicitImpl = false
IsFinal = false
MemberKind = MemberKind.PropertyGet },
tmp.fsx (7,4--7,29) IsSynthetic=false)],
tmp.fsx (7,4--7,29) IsSynthetic=false), [],
tmp.fsx (6,5--7,29) IsSynthetic=false)],
tmp.fsx (6,0--7,29) IsSynthetic=false)],
PreXmlDoc ((1,6), FSharp.Compiler.XmlDoc+XmlDocCollector), [], None,
tmp.fsx (1,0--7,29) IsSynthetic=false)], (true, true))) Notice that both Now in case of signature files, this does matter (see #944) and there we have a workaround via the trivia information. I guess the same trick can be applied here for |
Then one could argue this is not a bug but a feature? |
Issue created from fantomas-online
Code
Result
Problem description
Member keyword is deleted.
This may be intentional, is that the case?
Extra information
Options
Fantomas 4.0.0-beta-003
Default Fantomas configuration
The text was updated successfully, but these errors were encountered: