Skip to content

Commit a062d7d

Browse files
committed
C#: Add regression test
1 parent ba4fb82 commit a062d7d

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

csharp/ql/test/library-tests/regressions/Program.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
// semmle-extractor-options: /langversion:8.0
22

33
using System;
44
using System.Threading.Tasks;
@@ -180,4 +180,13 @@ void F()
180180
}
181181
}
182182

183+
class TupleMatching
184+
{
185+
(int, object) G(object o1, object o2)
186+
{
187+
(object, object)? pair = (o1, o2);
188+
return (0, pair is var (x, y) ? x : null);
189+
}
190+
}
191+
183192
// semmle-extractor-options: /r:System.Dynamic.Runtime.dll

csharp/ql/test/library-tests/regressions/TypeMentions.expected

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,12 @@
8282
| Program.cs:169:5:169:10 | String |
8383
| Program.cs:174:5:174:8 | Void |
8484
| Program.cs:176:17:176:19 | IDisposable |
85+
| Program.cs:185:5:185:17 | (Int32,Object) |
86+
| Program.cs:185:6:185:8 | Int32 |
87+
| Program.cs:185:11:185:16 | Object |
88+
| Program.cs:185:21:185:26 | Object |
89+
| Program.cs:185:32:185:37 | Object |
90+
| Program.cs:187:9:187:24 | (Object,Object) |
91+
| Program.cs:187:9:187:25 | Nullable<(Object,Object)> |
92+
| Program.cs:187:10:187:15 | Object |
93+
| Program.cs:187:18:187:23 | Object |

0 commit comments

Comments
 (0)