@@ -200,6 +200,7 @@ public class TestClass
200200
201201 [ Fact ]
202202 [ WorkItem ( 2472 , "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/2472" ) ]
203+ [ WorkItem ( 2532 , "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/2532" ) ]
203204 public async Task TestTupleOutParametersAsync ( )
204205 {
205206 var testCode = @"namespace TestNamespace
@@ -209,6 +210,13 @@ public class TestClass
209210 public int TestMethod1(out( int, int)[] arg) => throw null;
210211 public int TestMethod2(out(int, int)[] arg) => throw null;
211212 public int TestMethod3(out ( int, int)[] arg) => throw null;
213+ public void TestMethod4()
214+ {
215+ var x = new System.Collections.Generic.Dictionary<int, (int, bool)>();
216+ x.TryGetValue(1, out( int, bool) value1);
217+ x.TryGetValue(2, out(int, bool) value2);
218+ x.TryGetValue(3, out ( int, bool) value3);
219+ }
212220 }
213221}
214222" ;
@@ -220,6 +228,13 @@ public class TestClass
220228 public int TestMethod1(out (int, int)[] arg) => throw null;
221229 public int TestMethod2(out (int, int)[] arg) => throw null;
222230 public int TestMethod3(out (int, int)[] arg) => throw null;
231+ public void TestMethod4()
232+ {
233+ var x = new System.Collections.Generic.Dictionary<int, (int, bool)>();
234+ x.TryGetValue(1, out (int, bool) value1);
235+ x.TryGetValue(2, out (int, bool) value2);
236+ x.TryGetValue(3, out (int, bool) value3);
237+ }
223238 }
224239}
225240" ;
@@ -235,6 +250,14 @@ public class TestClass
235250
236251 // TestMethod3
237252 this . CSharpDiagnostic ( DescriptorNotFollowed ) . WithLocation ( 7 , 36 ) ,
253+
254+ // TestMethod4
255+ this . CSharpDiagnostic ( DescriptorPreceded ) . WithLocation ( 11 , 33 ) ,
256+ this . CSharpDiagnostic ( DescriptorNotFollowed ) . WithLocation ( 11 , 33 ) ,
257+
258+ this . CSharpDiagnostic ( DescriptorPreceded ) . WithLocation ( 12 , 33 ) ,
259+
260+ this . CSharpDiagnostic ( DescriptorNotFollowed ) . WithLocation ( 13 , 34 ) ,
238261 } ;
239262
240263 await this . VerifyCSharpDiagnosticAsync ( testCode , expectedDiagnostic , CancellationToken . None ) . ConfigureAwait ( false ) ;
0 commit comments