From d401891d3086589c91844b601482eb6eca915078 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Fri, 4 Oct 2024 11:16:01 +0100 Subject: [PATCH] copyedit --- go/ql/lib/semmle/go/Scopes.qll | 5 ----- go/ql/lib/semmle/go/Types.qll | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/go/ql/lib/semmle/go/Scopes.qll b/go/ql/lib/semmle/go/Scopes.qll index 277afdb216e3..191534759ea6 100644 --- a/go/ql/lib/semmle/go/Scopes.qll +++ b/go/ql/lib/semmle/go/Scopes.qll @@ -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) diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index 12236d73dad9..4818db2f774d 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -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))