-
Notifications
You must be signed in to change notification settings - Fork 789
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parser: recover on unfinished interface member (#15943)
- Loading branch information
1 parent
f0c490d
commit 4a9701c
Showing
26 changed files
with
519 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Module | ||
|
||
type T = | ||
inherit as t | ||
|
||
member this.P = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
ImplFile | ||
(ParsedImplFileInput | ||
("/root/Member/Inherit 08.fs", false, QualifiedNameOfFile Module, [], [], | ||
[SynModuleOrNamespace | ||
([Module], false, NamedModule, | ||
[Types | ||
([SynTypeDefn | ||
(SynComponentInfo | ||
([], None, [], [T], | ||
PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), | ||
false, None, (3,5--3,6)), | ||
ObjectModel | ||
(Unspecified, | ||
[Inherit | ||
(LongIdent (SynLongIdent ([], [], [])), None, | ||
(4,4--4,11)); | ||
Member | ||
(SynBinding | ||
(None, Normal, false, false, [], | ||
PreXmlDoc ((4,12), FSharp.Compiler.Xml.XmlDocCollector), | ||
SynValData | ||
(Some { IsInstance = true | ||
IsDispatchSlot = false | ||
IsOverrideOrExplicitImpl = false | ||
IsFinal = false | ||
GetterOrSetterIsCompilerGenerated = false | ||
MemberKind = Member }, | ||
SynValInfo | ||
([[SynArgInfo ([], false, None)]; []], | ||
SynArgInfo ([], false, None)), None, None), | ||
LongIdent | ||
(SynLongIdent | ||
([this; P], [(6,15--6,16)], [None; None]), None, | ||
None, Pats [], None, (6,11--6,17)), None, | ||
Const (Int32 1, (6,20--6,21)), (6,11--6,17), | ||
NoneAtInvisible, | ||
{ LeadingKeyword = Member (6,4--6,10) | ||
InlineKeyword = None | ||
EqualsRange = Some (6,18--6,19) }), (4,12--6,21))], | ||
(4,4--6,21)), [], None, (3,5--6,21), | ||
{ LeadingKeyword = Type (3,0--3,4) | ||
EqualsRange = Some (3,7--3,8) | ||
WithKeyword = None })], (3,0--6,21))], | ||
PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, | ||
(1,0--6,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), | ||
{ ConditionalDirectives = [] | ||
CodeComments = [] }, set [])) | ||
|
||
(4,12)-(4,14) parse error Unexpected keyword 'as' in type definition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module Module | ||
|
||
type T = | ||
interface | ||
|
||
member this.P = 1 | ||
|
||
() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
ImplFile | ||
(ParsedImplFileInput | ||
("/root/Member/Interface 08.fs", false, QualifiedNameOfFile Module, [], [], | ||
[SynModuleOrNamespace | ||
([Module], false, NamedModule, | ||
[Types | ||
([SynTypeDefn | ||
(SynComponentInfo | ||
([], None, [], [T], | ||
PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), | ||
false, None, (3,5--3,6)), | ||
ObjectModel | ||
(Unspecified, | ||
[Interface | ||
(FromParseError (4,13--4,13), None, None, (4,4--4,13)); | ||
Member | ||
(SynBinding | ||
(None, Normal, false, false, [], | ||
PreXmlDoc ((6,4), FSharp.Compiler.Xml.XmlDocCollector), | ||
SynValData | ||
(Some { IsInstance = true | ||
IsDispatchSlot = false | ||
IsOverrideOrExplicitImpl = false | ||
IsFinal = false | ||
GetterOrSetterIsCompilerGenerated = false | ||
MemberKind = Member }, | ||
SynValInfo | ||
([[SynArgInfo ([], false, None)]; []], | ||
SynArgInfo ([], false, None)), None, None), | ||
LongIdent | ||
(SynLongIdent | ||
([this; P], [(6,15--6,16)], [None; None]), None, | ||
None, Pats [], None, (6,11--6,17)), None, | ||
Const (Int32 1, (6,20--6,21)), (6,11--6,17), | ||
NoneAtInvisible, | ||
{ LeadingKeyword = Member (6,4--6,10) | ||
InlineKeyword = None | ||
EqualsRange = Some (6,18--6,19) }), (6,4--6,21))], | ||
(4,4--6,21)), [], None, (3,5--6,21), | ||
{ LeadingKeyword = Type (3,0--3,4) | ||
EqualsRange = Some (3,7--3,8) | ||
WithKeyword = None })], (3,0--6,21)); | ||
Expr (Const (Unit, (8,0--8,2)), (8,0--8,2))], | ||
PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, | ||
(1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), | ||
{ ConditionalDirectives = [] | ||
CodeComments = [] }, set [])) | ||
|
||
(4,14)-(6,4) parse error Incomplete structured construct at or before this point in member definition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module Module | ||
|
||
type T = | ||
interface | ||
|
||
type T2 = int | ||
|
||
() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
ImplFile | ||
(ParsedImplFileInput | ||
("/root/Member/Interface 09.fs", false, QualifiedNameOfFile Module, [], [], | ||
[SynModuleOrNamespace | ||
([Module], false, NamedModule, | ||
[Types | ||
([SynTypeDefn | ||
(SynComponentInfo | ||
([], None, [], [T], | ||
PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), | ||
false, None, (3,5--3,6)), | ||
ObjectModel | ||
(Unspecified, | ||
[Interface | ||
(FromParseError (4,13--4,13), None, None, (4,4--4,13))], | ||
(4,4--4,13)), [], None, (3,5--4,13), | ||
{ LeadingKeyword = Type (3,0--3,4) | ||
EqualsRange = Some (3,7--3,8) | ||
WithKeyword = None })], (3,0--4,13)); | ||
Types | ||
([SynTypeDefn | ||
(SynComponentInfo | ||
([], None, [], [T2], | ||
PreXmlDoc ((6,0), FSharp.Compiler.Xml.XmlDocCollector), | ||
false, None, (6,5--6,7)), | ||
Simple | ||
(TypeAbbrev | ||
(Ok, LongIdent (SynLongIdent ([int], [], [None])), | ||
(6,10--6,13)), (6,10--6,13)), [], None, (6,5--6,13), | ||
{ LeadingKeyword = Type (6,0--6,4) | ||
EqualsRange = Some (6,8--6,9) | ||
WithKeyword = None })], (6,0--6,13)); | ||
Expr (Const (Unit, (8,0--8,2)), (8,0--8,2))], | ||
PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, | ||
(1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), | ||
{ ConditionalDirectives = [] | ||
CodeComments = [] }, set [])) | ||
|
||
(6,0)-(6,4) parse error Incomplete structured construct at or before this point in member definition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module Module | ||
|
||
type T = | ||
interface | ||
|
||
type T2 = int | ||
|
||
() |
Oops, something went wrong.