Skip to content

Commit

Permalink
copyedit
Browse files Browse the repository at this point in the history
  • Loading branch information
smowton committed Oct 8, 2024
1 parent c79da8b commit d401891
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions go/ql/lib/semmle/go/Scopes.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion go/ql/lib/semmle/go/Types.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d401891

Please sign in to comment.