CodeQL library for C#
codeql/csharp-all 0.9.0 (changelog, source)
Search

Member predicate OverridableCallable::getInherited

Gets the unique callable inherited by (or defined in) type t that overrides, implements, or equals this callable, where this callable is defined in a (transitive, reflexive) base type of t.

Example:

class C1 { public virtual void M() { } }

class C2 : C1 { public override void M() { } }

class C3 : C2 { }

The following holds:

  • C1.M = C1.M.getInherited(C1),
  • C2.M = C1.M.getInherited(C2),
  • C2.M = C1.M.getInherited(C3),
  • C2.M = C2.M.getInherited(C2), and
  • C2.M = C2.M.getInherited(C3).
Callable getInherited(ValueOrRefType t)