File tree Expand file tree Collapse file tree 4 files changed +29
-0
lines changed
csharp/ql/test/library-tests Expand file tree Collapse file tree 4 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1
1
testFailures
2
+ | Constructors.cs:113:25:113:43 | // ... | Missing result:hasValueFlow=6 |
2
3
edges
3
4
| Constructors.cs:5:24:5:25 | [post] this access : C_no_ctor [field s1] : Object | Constructors.cs:9:27:9:41 | object creation of type C_no_ctor : C_no_ctor [field s1] : Object | provenance | |
4
5
| Constructors.cs:5:29:5:45 | call to method Source<Object> : Object | Constructors.cs:5:24:5:25 | [post] this access : C_no_ctor [field s1] : Object | provenance | |
Original file line number Diff line number Diff line change @@ -101,6 +101,18 @@ public void M4()
101
101
Sink ( c2 . Obj22 ) ; // $ hasValueFlow=5
102
102
}
103
103
104
+ public class C3 ( object o31param )
105
+ {
106
+ public object Obj31 => o31param ;
107
+ }
108
+
109
+ public void M5 ( )
110
+ {
111
+ var o31 = Source < object > ( 6 ) ;
112
+ var c3 = new C3 ( o31 ) ;
113
+ Sink ( c3 . Obj31 ) ; // $ hasValueFlow=6
114
+ }
115
+
104
116
public static void Sink ( object o ) { }
105
117
106
118
public static T Source < T > ( object source ) => throw null ;
Original file line number Diff line number Diff line change @@ -2406,3 +2406,15 @@ expressions.cs:
2406
2406
# 512| 0: [IntLiteral] 10
2407
2407
# 515| 5: [Field] myInlineArrayElements
2408
2408
# 515| -1: [TypeMention] int
2409
+ # 518| 22: [Class] ClassC1
2410
+ # 518| 4: [InstanceConstructor,PrimaryConstructor] ClassC1
2411
+ #-----| 2: (Parameters)
2412
+ # 518| 0: [Parameter] oc1
2413
+ # 518| -1: [TypeMention] object
2414
+ # 520| 23: [Class] ClassC2
2415
+ #-----| 3: (Base types)
2416
+ # 520| 0: [TypeMention] ClassC1
2417
+ # 520| 4: [InstanceConstructor,PrimaryConstructor] ClassC2
2418
+ #-----| 2: (Parameters)
2419
+ # 520| 0: [Parameter] oc2
2420
+ # 520| -1: [TypeMention] object
Original file line number Diff line number Diff line change @@ -514,4 +514,8 @@ struct MyInlineArray
514
514
{
515
515
private int myInlineArrayElements ;
516
516
}
517
+
518
+ class ClassC1 ( object oc1 ) { }
519
+
520
+ class ClassC2 ( object oc2 ) : ClassC1 ( oc2 ) { }
517
521
}
You can’t perform that action at this time.
0 commit comments