mirror of
https://github.com/github/codeql.git
synced 2026-03-31 04:38:18 +02:00
27 lines
495 B
C#
27 lines
495 B
C#
public partial class Partial
|
|
{
|
|
public partial object PartialMethod(object o);
|
|
}
|
|
|
|
public partial class Partial
|
|
{
|
|
public partial object PartialMethod(object o)
|
|
{
|
|
return o;
|
|
}
|
|
}
|
|
public class C
|
|
{
|
|
public void M()
|
|
{
|
|
var o = Source<object>(1);
|
|
var p = new Partial();
|
|
var result = p.PartialMethod(o);
|
|
Sink(result); // $ hasValueFlow=1
|
|
}
|
|
|
|
public static void Sink(object o) { }
|
|
|
|
static T Source<T>(object source) => throw null;
|
|
}
|