File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed
csharp/ql/test/library-tests/typealias Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ using System ;
2
+
3
+ using TupleType1 = ( int , object ) ;
4
+ using TupleType2 = ( int , string ) ;
5
+ using TupleType3 = ( int , object ) ;
6
+ using Point = ( int x , int y ) ;
7
+
8
+ public class TupleMethods
9
+ {
10
+ public void M1 ( TupleType1 t )
11
+ {
12
+ var x = t . Item1 ;
13
+ var y = t . Item2 ;
14
+ }
15
+
16
+ public void M2 ( TupleType2 t )
17
+ {
18
+ var x = t . Item1 ;
19
+ var y = t . Item2 ;
20
+ M1 ( t ) ;
21
+ }
22
+
23
+ public void M3 ( Point p )
24
+ {
25
+ var x = p . x ;
26
+ var y = p . y ;
27
+ }
28
+
29
+ public void M4 ( TupleType3 t ) { }
30
+ }
Original file line number Diff line number Diff line change
1
+ | alias.cs:10:17:10:18 | M1 | alias.cs:10:31:10:31 | t | (Int32,Object) |
2
+ | alias.cs:16:17:16:18 | M2 | alias.cs:16:31:16:31 | t | (Int32,String) |
3
+ | alias.cs:23:17:23:18 | M3 | alias.cs:23:26:23:26 | p | (Int32,Int32) |
4
+ | alias.cs:29:17:29:18 | M4 | alias.cs:29:31:29:31 | t | (Int32,Object) |
Original file line number Diff line number Diff line change
1
+ import csharp
2
+
3
+ from Method m , Parameter p , Type t
4
+ where
5
+ m .fromSource ( ) and
6
+ p = m .getAParameter ( ) and
7
+ p .getType ( ) = t
8
+ select m , p , t .toString ( )
You can’t perform that action at this time.
0 commit comments