Skip to content

Commit ba47947

Browse files
committed
C#: Add Cast example.
1 parent d3530b0 commit ba47947

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

csharp/ql/test/library-tests/dataflow/global/GlobalDataFlow.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,15 @@ public void M6(bool b1, bool b2, bool b3)
513513
TaintField(b2 ? (b3 ? y1 : y2) : y3);
514514
Check(y2.field);
515515
}
516+
517+
private class SubSimpleClass : SimpleClass { }
518+
519+
public void M7()
520+
{
521+
var x = new SubSimpleClass();
522+
TaintField((SimpleClass)x);
523+
Check(x.field);
524+
}
516525
}
517526

518527
static class IEnumerableExtensions

0 commit comments

Comments
 (0)