Skip to content

Commit

Permalink
Undo inherit change
Browse files Browse the repository at this point in the history
  • Loading branch information
auduchinok committed Sep 7, 2023
1 parent 4cdeab0 commit 1a33439
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
7 changes: 3 additions & 4 deletions src/Compiler/pars.fsy
Original file line number Diff line number Diff line change
Expand Up @@ -2300,10 +2300,9 @@ inheritsDefn:
SynMemberDefn.ImplicitInherit($2, $4, $5, mDecl) }

| INHERIT ends_coming_soon_or_recover
{ let mInherit = rhs parseState 1
if not $2 then errorR (Error(FSComp.SR.parsTypeNameCannotBeEmpty (), mInherit))
let ty = SynType.FromParseError(mInherit.EndRange)
SynMemberDefn.Inherit(ty, None, mInherit) }
{ let mDecl = (rhs parseState 1)
if not $2 then errorR (Error(FSComp.SR.parsTypeNameCannotBeEmpty (), mDecl))
SynMemberDefn.Inherit(SynType.LongIdent(SynLongIdent([], [], [])), None, mDecl) }

optAsSpec:
| asSpec
Expand Down
5 changes: 3 additions & 2 deletions tests/service/data/SyntaxTree/Member/Inherit 03.fs.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ ImplFile
false, None, (3,5--3,6)),
ObjectModel
(Unspecified,
[Inherit (FromParseError (4,11--4,11), None, (4,4--4,11))],
(4,4--4,11)), [], None, (3,5--4,11),
[Inherit
(LongIdent (SynLongIdent ([], [], [])), None,
(4,4--4,11))], (4,4--4,11)), [], None, (3,5--4,11),
{ LeadingKeyword = Type (3,0--3,4)
EqualsRange = Some (3,7--3,8)
WithKeyword = None })], (3,0--4,11))],
Expand Down
5 changes: 3 additions & 2 deletions tests/service/data/SyntaxTree/Member/Inherit 04.fs.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ ImplFile
false, None, (3,5--3,6)),
ObjectModel
(Unspecified,
[Inherit (FromParseError (4,11--4,11), None, (4,4--4,11))],
(4,4--4,11)), [], None, (3,5--4,11),
[Inherit
(LongIdent (SynLongIdent ([], [], [])), None,
(4,4--4,11))], (4,4--4,11)), [], None, (3,5--4,11),
{ LeadingKeyword = Type (3,0--3,4)
EqualsRange = Some (3,7--3,8)
WithKeyword = None })], (3,0--4,11));
Expand Down
4 changes: 3 additions & 1 deletion tests/service/data/SyntaxTree/Member/Inherit 05.fs.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ ImplFile
false, None, (3,5--3,6)),
ObjectModel
(Unspecified,
[Inherit (FromParseError (4,11--4,11), None, (4,4--4,11));
[Inherit
(LongIdent (SynLongIdent ([], [], [])), None,
(4,4--4,11));
Member
(SynBinding
(None, Normal, false, false, [],
Expand Down
4 changes: 3 additions & 1 deletion tests/service/data/SyntaxTree/Member/Inherit 08.fs.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ ImplFile
false, None, (3,5--3,6)),
ObjectModel
(Unspecified,
[Inherit (FromParseError (4,11--4,11), None, (4,4--4,11));
[Inherit
(LongIdent (SynLongIdent ([], [], [])), None,
(4,4--4,11));
Member
(SynBinding
(None, Normal, false, false, [],
Expand Down

0 comments on commit 1a33439

Please sign in to comment.