This commit is contained in:
Chris Smowton 2024-10-04 11:16:01 +01:00
Родитель c79da8b2b5
Коммит d401891d30
2 изменённых файлов: 1 добавлений и 6 удалений

Просмотреть файл

@ -587,11 +587,6 @@ class Method extends Function {
predicate implementsIncludingInterfaceMethods(Method m) {
this = m
or
// Take all methods
// Get receiver type then underlying type ==> [method, recvutype]
// Map through Type.implements ==> [method, candtype]
// Get method name ==> [mname, candtype]
// Get corresponding method
exists(Type t, string mname |
t = implementsIncludingInterfaceMethodsCand(m, mname) and
this = t.getMethod(mname)

Просмотреть файл

@ -1075,7 +1075,7 @@ int numberOfTypesWithMethodName(string name) { result = count(Type t | t.hasMeth
*
* This is used to restrict the set of interfaces to consider in the definition of `implements`,
* so it does not matter which method name is chosen (we use the most unusual name the interface
* require; this is the most discriminating and so shrinks the search space the most).
* requires; this is the most discriminating and so shrinks the search space the most).
*/
private string getExampleMethodName(InterfaceType i) {
result = min(string m | i.hasMethod(m, _) | m order by numberOfTypesWithMethodName(m))