@@ -49,7 +49,7 @@ private class Private extends MethodCall {
4949 * method named `name`.
5050 */
5151 pragma [ noinline]
52- predicate isRef ( ClassDeclaration c , string name ) {
52+ predicate isRef ( Namespace c , string name ) {
5353 this = c .getAStmt ( ) and
5454 name = this .getMethod ( ) .( SymbolLiteral ) .getValueText ( )
5555 }
@@ -59,7 +59,7 @@ private class Private extends MethodCall {
5959 * and the call has no arguments.
6060 */
6161 pragma [ noinline]
62- predicate hasNoArg ( ClassDeclaration c , int i ) {
62+ predicate hasNoArg ( Namespace c , int i ) {
6363 this = c .getStmt ( i ) and
6464 not exists ( this .getMethod ( ) )
6565 }
@@ -91,7 +91,7 @@ class Method extends MethodBase, TMethod {
9191 final predicate isSetter ( ) { g .getName ( ) instanceof Ruby:: Setter }
9292
9393 pragma [ noinline]
94- private predicate isDeclaredIn ( ClassDeclaration c , string name ) {
94+ private predicate isDeclaredIn ( Namespace c , string name ) {
9595 this = c .getAStmt ( ) and
9696 name = this .getName ( )
9797 }
@@ -125,12 +125,12 @@ class Method extends MethodBase, TMethod {
125125 predicate isPrivate ( ) {
126126 this = any ( Private p ) .getMethod ( )
127127 or
128- exists ( ClassDeclaration c , Private p , string name |
128+ exists ( Namespace c , Private p , string name |
129129 this .isDeclaredIn ( c , name ) and
130130 p .isRef ( c , name )
131131 )
132132 or
133- exists ( ClassDeclaration c , Private p , int i , int j |
133+ exists ( Namespace c , Private p , int i , int j |
134134 p .hasNoArg ( c , i ) and
135135 this = c .getStmt ( j ) and
136136 j > i
0 commit comments