diff --git a/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md b/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md index 77f479bb3c1..11f63225348 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md +++ b/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md @@ -12,7 +12,7 @@ * Fix calling an overridden virtual static method via the interface ([PR #17013](https://github.com/dotnet/fsharp/pull/17013)) * Fix state machines compilation, when big decision trees are involved, by removing code split when resumable code is detected ([PR #17076](https://github.com/dotnet/fsharp/pull/17076)) * Fix for exponential runtime in CE builders when using nested implicit yields [PR #17096](https://github.com/dotnet/fsharp/pull/17096) -* Fix pattern matching parser regression ([Issue #16447](https://github.com/dotnet/fsharp/issues/16447), [PR #17113](https://github.com/dotnet/fsharp/pull/17113)) +* Fix several AND operator parser regressions ([Issue #16447](https://github.com/dotnet/fsharp/issues/16447), [Issue #17134](https://github.com/dotnet/fsharp/issues/17134), [PR #17113](https://github.com/dotnet/fsharp/pull/17113)) ### Added diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs index 1b181272a08..5fa8cdc7aa8 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs @@ -87,7 +87,31 @@ module Named = |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed + + [] + let ``Named - activePatterns09_fs`` compilation = + compilation + |> asFs + |> typecheck + |> shouldSucceed + [] + let ``Named - activePatterns10_fs`` compilation = + compilation + |> asFs + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 25, Line 6, Col 5, Line 6, Col 26, "Incomplete pattern matches on this expression.") + (Warning 25, Line 7, Col 5, Line 7, Col 28, "Incomplete pattern matches on this expression.") + (Warning 25, Line 8, Col 5, Line 8, Col 28, "Incomplete pattern matches on this expression.") + (Warning 25, Line 9, Col 5, Line 9, Col 30, "Incomplete pattern matches on this expression.") + (Warning 25, Line 13, Col 5, Line 13, Col 22, "Incomplete pattern matches on this expression. For example, the value '``some-other-subtype``' may indicate a case not covered by the pattern(s).") + (Warning 25, Line 14, Col 5, Line 14, Col 24, "Incomplete pattern matches on this expression. For example, the value '``some-other-subtype``' may indicate a case not covered by the pattern(s).") + (Warning 25, Line 15, Col 5, Line 15, Col 24, "Incomplete pattern matches on this expression. For example, the value '``some-other-subtype``' may indicate a case not covered by the pattern(s).") + (Warning 25, Line 16, Col 5, Line 16, Col 26, "Incomplete pattern matches on this expression. For example, the value '``some-other-subtype``' may indicate a case not covered by the pattern(s).") + ] + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) [] let ``Named - ActivePatternUnconstrained01_fs - --test:ErrorRanges`` compilation = diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/activePatterns09.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/activePatterns09.fs new file mode 100644 index 00000000000..0eb679178fd --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/activePatterns09.fs @@ -0,0 +1,18 @@ +// #Conformance #PatternMatching #ActivePatterns +#light + +// Verify AND on active patterns with exceptions + +let (_ : exn & Failure _ | _) = exn () +let ((_ : exn) & (Failure _) | (_)) = exn () +let (_ : exn & (Failure _) | _) = exn () +let ((_ : exn) & Failure _ | (_)) = exn () + +exception MyExn + +let (_ : exn & MyExn | _) = exn () +let ((_ : exn) & (MyExn) | (_)) = exn () +let (_ : exn & (MyExn) | _) = exn () +let ((_ : exn) & MyExn | (_)) = exn () + +exit 0 diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/activePatterns10.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/activePatterns10.fs new file mode 100644 index 00000000000..1a98c23889e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/activePatterns10.fs @@ -0,0 +1,18 @@ +// #Conformance #PatternMatching #ActivePatterns +#light + +// Verify AND on incomplete active patterns with exceptions + +let (_ : exn & Failure _) = exn () +let ((_ : exn) & Failure _) = exn () +let (_ : exn & (Failure _)) = exn () +let ((_ : exn) & (Failure _)) = exn () + +exception MyExn + +let (_ : exn & MyExn) = exn () +let ((_ : exn) & MyExn) = exn () +let (_ : exn & (MyExn)) = exn () +let ((_ : exn) & (MyExn)) = exn () + +exit 0 diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 01.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 01.fs new file mode 100644 index 00000000000..53ffa7e5d43 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 01.fs @@ -0,0 +1 @@ +let (_ : exn & Failure _) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 01.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 01.fs.bsl new file mode 100644 index 00000000000..43d64f45a98 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 01.fs.bsl @@ -0,0 +1,34 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternAnd 01.fs", false, + QualifiedNameOfFile ActivePatternAnd 01, [], [], + [SynModuleOrNamespace + ([ActivePatternAnd 01], false, AnonModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Ands + ([Typed + (Wild (1,5--1,6), + LongIdent (SynLongIdent ([exn], [], [None])), + (1,5--1,12)); + LongIdent + (SynLongIdent ([Failure], [], [None]), None, None, + Pats [Wild (1,23--1,24)], None, (1,15--1,24))], + (1,5--1,24)), (1,4--1,25)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (1,32--1,34)), + (1,28--1,34)), (1,4--1,25), Yes (1,0--1,34), + { LeadingKeyword = Let (1,0--1,3) + InlineKeyword = None + EqualsRange = Some (1,26--1,27) })], (1,0--1,34))], + PreXmlDocEmpty, [], None, (1,0--1,34), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(1,34) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 01' based on the file name 'ActivePatternAnd 01.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 02.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 02.fs new file mode 100644 index 00000000000..01cc92b9412 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 02.fs @@ -0,0 +1 @@ +let ((_ : exn) & Failure _) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 02.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 02.fs.bsl new file mode 100644 index 00000000000..23ebdc7c8da --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 02.fs.bsl @@ -0,0 +1,35 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternAnd 02.fs", false, + QualifiedNameOfFile ActivePatternAnd 02, [], [], + [SynModuleOrNamespace + ([ActivePatternAnd 02], false, AnonModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Ands + ([Paren + (Typed + (Wild (1,6--1,7), + LongIdent (SynLongIdent ([exn], [], [None])), + (1,6--1,13)), (1,5--1,14)); + LongIdent + (SynLongIdent ([Failure], [], [None]), None, None, + Pats [Wild (1,25--1,26)], None, (1,17--1,26))], + (1,5--1,26)), (1,4--1,27)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (1,34--1,36)), + (1,30--1,36)), (1,4--1,27), Yes (1,0--1,36), + { LeadingKeyword = Let (1,0--1,3) + InlineKeyword = None + EqualsRange = Some (1,28--1,29) })], (1,0--1,36))], + PreXmlDocEmpty, [], None, (1,0--1,36), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(1,36) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 02' based on the file name 'ActivePatternAnd 02.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 03.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 03.fs new file mode 100644 index 00000000000..88f4634bd35 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 03.fs @@ -0,0 +1 @@ +let (_ : exn & (Failure _)) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 03.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 03.fs.bsl new file mode 100644 index 00000000000..f59e50d9403 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 03.fs.bsl @@ -0,0 +1,35 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternAnd 03.fs", false, + QualifiedNameOfFile ActivePatternAnd 03, [], [], + [SynModuleOrNamespace + ([ActivePatternAnd 03], false, AnonModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Ands + ([Typed + (Wild (1,5--1,6), + LongIdent (SynLongIdent ([exn], [], [None])), + (1,5--1,12)); + Paren + (LongIdent + (SynLongIdent ([Failure], [], [None]), None, None, + Pats [Wild (1,24--1,25)], None, (1,16--1,25)), + (1,15--1,26))], (1,5--1,26)), (1,4--1,27)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (1,34--1,36)), + (1,30--1,36)), (1,4--1,27), Yes (1,0--1,36), + { LeadingKeyword = Let (1,0--1,3) + InlineKeyword = None + EqualsRange = Some (1,28--1,29) })], (1,0--1,36))], + PreXmlDocEmpty, [], None, (1,0--1,36), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(1,36) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 03' based on the file name 'ActivePatternAnd 03.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 04.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 04.fs new file mode 100644 index 00000000000..1e3abce4eae --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 04.fs @@ -0,0 +1 @@ +let ((_ : exn) & (Failure _)) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 04.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 04.fs.bsl new file mode 100644 index 00000000000..37b343fad98 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 04.fs.bsl @@ -0,0 +1,36 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternAnd 04.fs", false, + QualifiedNameOfFile ActivePatternAnd 04, [], [], + [SynModuleOrNamespace + ([ActivePatternAnd 04], false, AnonModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Ands + ([Paren + (Typed + (Wild (1,6--1,7), + LongIdent (SynLongIdent ([exn], [], [None])), + (1,6--1,13)), (1,5--1,14)); + Paren + (LongIdent + (SynLongIdent ([Failure], [], [None]), None, None, + Pats [Wild (1,26--1,27)], None, (1,18--1,27)), + (1,17--1,28))], (1,5--1,28)), (1,4--1,29)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (1,36--1,38)), + (1,32--1,38)), (1,4--1,29), Yes (1,0--1,38), + { LeadingKeyword = Let (1,0--1,3) + InlineKeyword = None + EqualsRange = Some (1,30--1,31) })], (1,0--1,38))], + PreXmlDocEmpty, [], None, (1,0--1,38), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(1,38) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 04' based on the file name 'ActivePatternAnd 04.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 05.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 05.fs new file mode 100644 index 00000000000..4c14b8934c3 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 05.fs @@ -0,0 +1 @@ +let (_ : exn & Failure _ | _) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 05.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 05.fs.bsl new file mode 100644 index 00000000000..062a413ccde --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 05.fs.bsl @@ -0,0 +1,36 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternAnd 05.fs", false, + QualifiedNameOfFile ActivePatternAnd 05, [], [], + [SynModuleOrNamespace + ([ActivePatternAnd 05], false, AnonModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Or + (Ands + ([Typed + (Wild (1,5--1,6), + LongIdent (SynLongIdent ([exn], [], [None])), + (1,5--1,12)); + LongIdent + (SynLongIdent ([Failure], [], [None]), None, None, + Pats [Wild (1,23--1,24)], None, (1,15--1,24))], + (1,5--1,24)), Wild (1,27--1,28), (1,5--1,28), + { BarRange = (1,25--1,26) }), (1,4--1,29)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (1,36--1,38)), + (1,32--1,38)), (1,4--1,29), Yes (1,0--1,38), + { LeadingKeyword = Let (1,0--1,3) + InlineKeyword = None + EqualsRange = Some (1,30--1,31) })], (1,0--1,38))], + PreXmlDocEmpty, [], None, (1,0--1,38), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(1,38) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 05' based on the file name 'ActivePatternAnd 05.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 06.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 06.fs new file mode 100644 index 00000000000..83fe84e41eb --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 06.fs @@ -0,0 +1 @@ +let ((_ : exn) & (Failure _) | (_)) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 06.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 06.fs.bsl new file mode 100644 index 00000000000..7c8649824d5 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 06.fs.bsl @@ -0,0 +1,39 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternAnd 06.fs", false, + QualifiedNameOfFile ActivePatternAnd 06, [], [], + [SynModuleOrNamespace + ([ActivePatternAnd 06], false, AnonModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Or + (Ands + ([Paren + (Typed + (Wild (1,6--1,7), + LongIdent (SynLongIdent ([exn], [], [None])), + (1,6--1,13)), (1,5--1,14)); + Paren + (LongIdent + (SynLongIdent ([Failure], [], [None]), None, + None, Pats [Wild (1,26--1,27)], None, + (1,18--1,27)), (1,17--1,28))], (1,5--1,28)), + Paren (Wild (1,32--1,33), (1,31--1,34)), (1,5--1,34), + { BarRange = (1,29--1,30) }), (1,4--1,35)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (1,42--1,44)), + (1,38--1,44)), (1,4--1,35), Yes (1,0--1,44), + { LeadingKeyword = Let (1,0--1,3) + InlineKeyword = None + EqualsRange = Some (1,36--1,37) })], (1,0--1,44))], + PreXmlDocEmpty, [], None, (1,0--1,44), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(1,44) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 06' based on the file name 'ActivePatternAnd 06.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 07.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 07.fs new file mode 100644 index 00000000000..1d50cd1a7c2 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 07.fs @@ -0,0 +1 @@ +let (_ : exn & (Failure _) | _) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 07.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 07.fs.bsl new file mode 100644 index 00000000000..71db7cf842c --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 07.fs.bsl @@ -0,0 +1,38 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternAnd 07.fs", false, + QualifiedNameOfFile ActivePatternAnd 07, [], [], + [SynModuleOrNamespace + ([ActivePatternAnd 07], false, AnonModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Or + (Ands + ([Typed + (Wild (1,5--1,6), + LongIdent (SynLongIdent ([exn], [], [None])), + (1,5--1,12)); + Paren + (LongIdent + (SynLongIdent ([Failure], [], [None]), None, + None, Pats [Wild (1,24--1,25)], None, + (1,16--1,25)), (1,15--1,26))], (1,5--1,26)), + Wild (1,29--1,30), (1,5--1,30), + { BarRange = (1,27--1,28) }), (1,4--1,31)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (1,38--1,40)), + (1,34--1,40)), (1,4--1,31), Yes (1,0--1,40), + { LeadingKeyword = Let (1,0--1,3) + InlineKeyword = None + EqualsRange = Some (1,32--1,33) })], (1,0--1,40))], + PreXmlDocEmpty, [], None, (1,0--1,40), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(1,40) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 07' based on the file name 'ActivePatternAnd 07.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 08.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 08.fs new file mode 100644 index 00000000000..220472681c3 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 08.fs @@ -0,0 +1 @@ +let ((_ : exn) & Failure _ | (_)) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 08.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 08.fs.bsl new file mode 100644 index 00000000000..c2c958503a8 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 08.fs.bsl @@ -0,0 +1,38 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternAnd 08.fs", false, + QualifiedNameOfFile ActivePatternAnd 08, [], [], + [SynModuleOrNamespace + ([ActivePatternAnd 08], false, AnonModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Or + (Ands + ([Paren + (Typed + (Wild (1,6--1,7), + LongIdent (SynLongIdent ([exn], [], [None])), + (1,6--1,13)), (1,5--1,14)); + LongIdent + (SynLongIdent ([Failure], [], [None]), None, None, + Pats [Wild (1,25--1,26)], None, (1,17--1,26))], + (1,5--1,26)), Paren (Wild (1,30--1,31), (1,29--1,32)), + (1,5--1,32), { BarRange = (1,27--1,28) }), (1,4--1,33)), + None, + App + (NonAtomic, false, Ident exn, Const (Unit, (1,40--1,42)), + (1,36--1,42)), (1,4--1,33), Yes (1,0--1,42), + { LeadingKeyword = Let (1,0--1,3) + InlineKeyword = None + EqualsRange = Some (1,34--1,35) })], (1,0--1,42))], + PreXmlDocEmpty, [], None, (1,0--1,42), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(1,42) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 08' based on the file name 'ActivePatternAnd 08.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 01.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 01.fs new file mode 100644 index 00000000000..164868fd113 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 01.fs @@ -0,0 +1,3 @@ +exception MyExn + +let (_ : exn & MyExn) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 01.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 01.fs.bsl new file mode 100644 index 00000000000..f90393a139b --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 01.fs.bsl @@ -0,0 +1,43 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternExceptionAnd 01.fs", false, + QualifiedNameOfFile ActivePatternExceptionAnd 01, [], [], + [SynModuleOrNamespace + ([ActivePatternExceptionAnd 01], false, AnonModule, + [Exception + (SynExceptionDefn + (SynExceptionDefnRepr + ([], + SynUnionCase + ([], SynIdent (MyExn, None), Fields [], PreXmlDocEmpty, + None, (1,10--1,15), { BarRange = None }), None, + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), None, + (1,0--1,15)), None, [], (1,0--1,15)), (1,0--1,15)); + Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Ands + ([Typed + (Wild (3,5--3,6), + LongIdent (SynLongIdent ([exn], [], [None])), + (3,5--3,12)); + LongIdent + (SynLongIdent ([MyExn], [], [None]), None, None, + Pats [], None, (3,15--3,20))], (3,5--3,20)), + (3,4--3,21)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (3,28--3,30)), + (3,24--3,30)), (3,4--3,21), Yes (3,0--3,30), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,22--3,23) })], (3,0--3,30))], + PreXmlDocEmpty, [], None, (1,0--3,30), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 01' based on the file name 'ActivePatternExceptionAnd 01.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 02.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 02.fs new file mode 100644 index 00000000000..9cae7fcde59 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 02.fs @@ -0,0 +1,3 @@ +exception MyExn + +let ((_ : exn) & MyExn) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 02.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 02.fs.bsl new file mode 100644 index 00000000000..ad1420869f1 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 02.fs.bsl @@ -0,0 +1,44 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternExceptionAnd 02.fs", false, + QualifiedNameOfFile ActivePatternExceptionAnd 02, [], [], + [SynModuleOrNamespace + ([ActivePatternExceptionAnd 02], false, AnonModule, + [Exception + (SynExceptionDefn + (SynExceptionDefnRepr + ([], + SynUnionCase + ([], SynIdent (MyExn, None), Fields [], PreXmlDocEmpty, + None, (1,10--1,15), { BarRange = None }), None, + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), None, + (1,0--1,15)), None, [], (1,0--1,15)), (1,0--1,15)); + Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Ands + ([Paren + (Typed + (Wild (3,6--3,7), + LongIdent (SynLongIdent ([exn], [], [None])), + (3,6--3,13)), (3,5--3,14)); + LongIdent + (SynLongIdent ([MyExn], [], [None]), None, None, + Pats [], None, (3,17--3,22))], (3,5--3,22)), + (3,4--3,23)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (3,30--3,32)), + (3,26--3,32)), (3,4--3,23), Yes (3,0--3,32), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,24--3,25) })], (3,0--3,32))], + PreXmlDocEmpty, [], None, (1,0--3,32), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 02' based on the file name 'ActivePatternExceptionAnd 02.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 03.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 03.fs new file mode 100644 index 00000000000..ff279dd75d8 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 03.fs @@ -0,0 +1,3 @@ +exception MyExn + +let (_ : exn & (MyExn)) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 03.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 03.fs.bsl new file mode 100644 index 00000000000..1b4bdf7dfd9 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 03.fs.bsl @@ -0,0 +1,44 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternExceptionAnd 03.fs", false, + QualifiedNameOfFile ActivePatternExceptionAnd 03, [], [], + [SynModuleOrNamespace + ([ActivePatternExceptionAnd 03], false, AnonModule, + [Exception + (SynExceptionDefn + (SynExceptionDefnRepr + ([], + SynUnionCase + ([], SynIdent (MyExn, None), Fields [], PreXmlDocEmpty, + None, (1,10--1,15), { BarRange = None }), None, + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), None, + (1,0--1,15)), None, [], (1,0--1,15)), (1,0--1,15)); + Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Ands + ([Typed + (Wild (3,5--3,6), + LongIdent (SynLongIdent ([exn], [], [None])), + (3,5--3,12)); + Paren + (LongIdent + (SynLongIdent ([MyExn], [], [None]), None, None, + Pats [], None, (3,16--3,21)), (3,15--3,22))], + (3,5--3,22)), (3,4--3,23)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (3,30--3,32)), + (3,26--3,32)), (3,4--3,23), Yes (3,0--3,32), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,24--3,25) })], (3,0--3,32))], + PreXmlDocEmpty, [], None, (1,0--3,32), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 03' based on the file name 'ActivePatternExceptionAnd 03.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 04.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 04.fs new file mode 100644 index 00000000000..11d5e3c892b --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 04.fs @@ -0,0 +1,3 @@ +exception MyExn + +let ((_ : exn) & (MyExn)) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 04.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 04.fs.bsl new file mode 100644 index 00000000000..ea96f1966b4 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 04.fs.bsl @@ -0,0 +1,45 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternExceptionAnd 04.fs", false, + QualifiedNameOfFile ActivePatternExceptionAnd 04, [], [], + [SynModuleOrNamespace + ([ActivePatternExceptionAnd 04], false, AnonModule, + [Exception + (SynExceptionDefn + (SynExceptionDefnRepr + ([], + SynUnionCase + ([], SynIdent (MyExn, None), Fields [], PreXmlDocEmpty, + None, (1,10--1,15), { BarRange = None }), None, + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), None, + (1,0--1,15)), None, [], (1,0--1,15)), (1,0--1,15)); + Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Ands + ([Paren + (Typed + (Wild (3,6--3,7), + LongIdent (SynLongIdent ([exn], [], [None])), + (3,6--3,13)), (3,5--3,14)); + Paren + (LongIdent + (SynLongIdent ([MyExn], [], [None]), None, None, + Pats [], None, (3,18--3,23)), (3,17--3,24))], + (3,5--3,24)), (3,4--3,25)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (3,32--3,34)), + (3,28--3,34)), (3,4--3,25), Yes (3,0--3,34), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,26--3,27) })], (3,0--3,34))], + PreXmlDocEmpty, [], None, (1,0--3,34), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 04' based on the file name 'ActivePatternExceptionAnd 04.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 05.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 05.fs new file mode 100644 index 00000000000..7d33237aa1a --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 05.fs @@ -0,0 +1,3 @@ +exception MyExn + +let (_ : exn & MyExn | _) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 05.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 05.fs.bsl new file mode 100644 index 00000000000..2517eb3918d --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 05.fs.bsl @@ -0,0 +1,45 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternExceptionAnd 05.fs", false, + QualifiedNameOfFile ActivePatternExceptionAnd 05, [], [], + [SynModuleOrNamespace + ([ActivePatternExceptionAnd 05], false, AnonModule, + [Exception + (SynExceptionDefn + (SynExceptionDefnRepr + ([], + SynUnionCase + ([], SynIdent (MyExn, None), Fields [], PreXmlDocEmpty, + None, (1,10--1,15), { BarRange = None }), None, + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), None, + (1,0--1,15)), None, [], (1,0--1,15)), (1,0--1,15)); + Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Or + (Ands + ([Typed + (Wild (3,5--3,6), + LongIdent (SynLongIdent ([exn], [], [None])), + (3,5--3,12)); + LongIdent + (SynLongIdent ([MyExn], [], [None]), None, None, + Pats [], None, (3,15--3,20))], (3,5--3,20)), + Wild (3,23--3,24), (3,5--3,24), + { BarRange = (3,21--3,22) }), (3,4--3,25)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (3,32--3,34)), + (3,28--3,34)), (3,4--3,25), Yes (3,0--3,34), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,26--3,27) })], (3,0--3,34))], + PreXmlDocEmpty, [], None, (1,0--3,34), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 05' based on the file name 'ActivePatternExceptionAnd 05.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 06.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 06.fs new file mode 100644 index 00000000000..afc4c16b4d0 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 06.fs @@ -0,0 +1,3 @@ +exception MyExn + +let ((_ : exn) & (MyExn) | (_)) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 06.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 06.fs.bsl new file mode 100644 index 00000000000..91e95536c83 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 06.fs.bsl @@ -0,0 +1,48 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternExceptionAnd 06.fs", false, + QualifiedNameOfFile ActivePatternExceptionAnd 06, [], [], + [SynModuleOrNamespace + ([ActivePatternExceptionAnd 06], false, AnonModule, + [Exception + (SynExceptionDefn + (SynExceptionDefnRepr + ([], + SynUnionCase + ([], SynIdent (MyExn, None), Fields [], PreXmlDocEmpty, + None, (1,10--1,15), { BarRange = None }), None, + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), None, + (1,0--1,15)), None, [], (1,0--1,15)), (1,0--1,15)); + Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Or + (Ands + ([Paren + (Typed + (Wild (3,6--3,7), + LongIdent (SynLongIdent ([exn], [], [None])), + (3,6--3,13)), (3,5--3,14)); + Paren + (LongIdent + (SynLongIdent ([MyExn], [], [None]), None, None, + Pats [], None, (3,18--3,23)), (3,17--3,24))], + (3,5--3,24)), Paren (Wild (3,28--3,29), (3,27--3,30)), + (3,5--3,30), { BarRange = (3,25--3,26) }), (3,4--3,31)), + None, + App + (NonAtomic, false, Ident exn, Const (Unit, (3,38--3,40)), + (3,34--3,40)), (3,4--3,31), Yes (3,0--3,40), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,32--3,33) })], (3,0--3,40))], + PreXmlDocEmpty, [], None, (1,0--3,40), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 06' based on the file name 'ActivePatternExceptionAnd 06.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 07.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 07.fs new file mode 100644 index 00000000000..ac495a6b843 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 07.fs @@ -0,0 +1,3 @@ +exception MyExn + +let (_ : exn & (MyExn) | _) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 07.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 07.fs.bsl new file mode 100644 index 00000000000..35c7d986cf3 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 07.fs.bsl @@ -0,0 +1,46 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternExceptionAnd 07.fs", false, + QualifiedNameOfFile ActivePatternExceptionAnd 07, [], [], + [SynModuleOrNamespace + ([ActivePatternExceptionAnd 07], false, AnonModule, + [Exception + (SynExceptionDefn + (SynExceptionDefnRepr + ([], + SynUnionCase + ([], SynIdent (MyExn, None), Fields [], PreXmlDocEmpty, + None, (1,10--1,15), { BarRange = None }), None, + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), None, + (1,0--1,15)), None, [], (1,0--1,15)), (1,0--1,15)); + Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Or + (Ands + ([Typed + (Wild (3,5--3,6), + LongIdent (SynLongIdent ([exn], [], [None])), + (3,5--3,12)); + Paren + (LongIdent + (SynLongIdent ([MyExn], [], [None]), None, None, + Pats [], None, (3,16--3,21)), (3,15--3,22))], + (3,5--3,22)), Wild (3,25--3,26), (3,5--3,26), + { BarRange = (3,23--3,24) }), (3,4--3,27)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (3,34--3,36)), + (3,30--3,36)), (3,4--3,27), Yes (3,0--3,36), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,28--3,29) })], (3,0--3,36))], + PreXmlDocEmpty, [], None, (1,0--3,36), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 07' based on the file name 'ActivePatternExceptionAnd 07.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 08.fs b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 08.fs new file mode 100644 index 00000000000..27ae3ae7002 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 08.fs @@ -0,0 +1,3 @@ +exception MyExn + +let ((_ : exn) & MyExn | (_)) = exn () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 08.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 08.fs.bsl new file mode 100644 index 00000000000..d61d4fa3ef0 --- /dev/null +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 08.fs.bsl @@ -0,0 +1,46 @@ +ImplFile + (ParsedImplFileInput + ("/root/OperatorName/ActivePatternExceptionAnd 08.fs", false, + QualifiedNameOfFile ActivePatternExceptionAnd 08, [], [], + [SynModuleOrNamespace + ([ActivePatternExceptionAnd 08], false, AnonModule, + [Exception + (SynExceptionDefn + (SynExceptionDefnRepr + ([], + SynUnionCase + ([], SynIdent (MyExn, None), Fields [], PreXmlDocEmpty, + None, (1,10--1,15), { BarRange = None }), None, + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), None, + (1,0--1,15)), None, [], (1,0--1,15)), (1,0--1,15)); + Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Paren + (Or + (Ands + ([Paren + (Typed + (Wild (3,6--3,7), + LongIdent (SynLongIdent ([exn], [], [None])), + (3,6--3,13)), (3,5--3,14)); + LongIdent + (SynLongIdent ([MyExn], [], [None]), None, None, + Pats [], None, (3,17--3,22))], (3,5--3,22)), + Paren (Wild (3,26--3,27), (3,25--3,28)), (3,5--3,28), + { BarRange = (3,23--3,24) }), (3,4--3,29)), None, + App + (NonAtomic, false, Ident exn, Const (Unit, (3,36--3,38)), + (3,32--3,38)), (3,4--3,29), Yes (3,0--3,38), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,30--3,31) })], (3,0--3,38))], + PreXmlDocEmpty, [], None, (1,0--3,38), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 08' based on the file name 'ActivePatternExceptionAnd 08.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file.