mirror of
https://github.com/github/codeql.git
synced 2026-04-22 23:35:14 +02:00
Merge pull request #4296 from hvitved/csharp/useless-upcast-nomagic
C#: Avoid bad magic in `UselessUpcast.ql`
This commit is contained in:
@@ -38,7 +38,7 @@ predicate hasInstanceCallable(ValueOrRefType t, InstanceCallable c, string name)
|
||||
}
|
||||
|
||||
/** Holds if extension method `m` is a method on `t` with name `name`. */
|
||||
pragma[noinline]
|
||||
pragma[nomagic]
|
||||
predicate hasExtensionMethod(ValueOrRefType t, ExtensionMethod m, string name) {
|
||||
t.isImplicitlyConvertibleTo(m.getExtendedType()) and
|
||||
name = m.getName()
|
||||
|
||||
Reference in New Issue
Block a user