Add clarifying comment

This commit is contained in:
Nick Rolfe
2021-04-29 14:00:27 +01:00
parent 9540125771
commit 59c83b7b8f

View File

@@ -162,6 +162,9 @@ private class RegularMethodCall extends MethodCall, TRegularMethodCall {
not exists(g.getReceiver()) and
toGenerated(result) = g.getMethod().(Generated::ScopeResolution).getScope()
or
// If there's no explicit receiver (or scope resolution that acts like a
// receiver), then the receiver is implicitly `self`. N.B. `::Foo()` is
// not valid Ruby.
not exists(g.getReceiver()) and
not exists(g.getMethod().(Generated::ScopeResolution).getScope()) and
result = TRegularMethodCallImplicitSelf(g)