Skip to content

Commit

Permalink
Add another test
Browse files Browse the repository at this point in the history
  • Loading branch information
auduchinok committed Jul 30, 2024
1 parent 523b382 commit 1f83cdc
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/service/data/SyntaxTree/Type/Union 07.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module Module

type U =
| A of int *
| B
45 changes: 45 additions & 0 deletions tests/service/data/SyntaxTree/Type/Union 07.fs.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
ImplFile
(ParsedImplFileInput
("/root/Type/Union 07.fs", false, QualifiedNameOfFile Module, [], [],
[SynModuleOrNamespace
([Module], false, NamedModule,
[Types
([SynTypeDefn
(SynComponentInfo
([], None, [], [U],
PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector),
false, None, (3,5--3,6)),
Simple
(Union
(None,
[SynUnionCase
([], SynIdent (A, None),
Fields
[SynField
([], false, None,
LongIdent (SynLongIdent ([int], [], [None])),
false,
PreXmlDoc ((4,11), FSharp.Compiler.Xml.XmlDocCollector),
None, (4,11--4,14), { LeadingKeyword = None
MutableKeyword = None });
SynField
([], false, None, FromParseError (4,16--4,16),
false, PreXmlDocEmpty, None, (4,16--4,16),
{ LeadingKeyword = None
MutableKeyword = None })],
PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector),
None, (4,6--4,16), { BarRange = Some (4,4--4,5) });
SynUnionCase
([], SynIdent (B, None), Fields [],
PreXmlDoc ((5,4), FSharp.Compiler.Xml.XmlDocCollector),
None, (5,6--5,7), { BarRange = Some (5,4--5,5) })],
(4,4--5,7)), (4,4--5,7)), [], None, (3,5--5,7),
{ LeadingKeyword = Type (3,0--3,4)
EqualsRange = Some (3,7--3,8)
WithKeyword = None })], (3,0--5,7))],
PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None,
(1,0--5,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true),
{ ConditionalDirectives = []
CodeComments = [] }, set []))

(5,4)-(5,5) parse error Unexpected symbol '|' in union case

0 comments on commit 1f83cdc

Please sign in to comment.